Our PHP content repository (PHPCR) implementation “Jackalope” is steadily improving. Besides the Jackrabbit backend, there is now also a driver for SQL databases (powered by Doctrine DB abstraction layer) and first work at a MongoDB driver and one for Midgard 1. Midgard 2 will get its own PHPCR implementation not based on Jackalope, and Typo 3 may choose to come back to PHPCR as well. Now is about time to show how to use that API.
PHPCR defines an API to handle semi-structured but hierarchical content in an elegant and consistent way. It combines the best from document-oriented databases (NoSQL) and XML databases (hierarchical trees). Additionally, the API defines search, versioning, access control and other important features.
A remark for the people interested in the Symfony Content Management Framework initiative: For the CMF you do not need to know how to code PHPCR. There is the Doctrine PHPCR-ODM layer that provides Document classes for yourcontent repository just as the Doctrine ORM abstracts from SQL databases. However, if you want to help us developping the CMF, you should look into the tutorial.
I wrote a tutorial that shows how to use PHPCR and explains how to install a playground to experiment with. The API is really simple to use and very expressive for hierarchical but flexible content. After the tutorial, you can take a look at the API documentation and at the full JCR specification.
I am happy to hear your feedback on this tutorial or the whole topic of content repositories.