How I came to terms with the Symfony CMF project

Let’s get this out there up front, writing and maintaining CMSs is my bread and butter. I maintain a large one for my day job, and use a small one for client sites after-hours. I think about them a lot. I try to think of how to make the ones I build better, and most importantly to me, how to improve the user experience.

Let me also point out that my writing style can be a little rambling, but I promise I will get to the point eventually.

So when I initially heard about Lukas Smith‘s Symfony CMS project, I got very very interested.

I read the slides, looked at the demo, and then looked at the demo’s admin dashboard.

Holy crap.

Look at the dashboard. Seriously, go look at it now if you haven’t yet. What is all of that, and how could I ever get a client to understand any of it? There’s no way my clients would accept anything like this. And that’s where my brain got stuck. That’s where I started to doubt Lukas’s sanity.

And I stayed that way for quite a while. Maybe a month, maybe two, maybe more. I’m not entirely sure.

Then one night, some of us in #symfony (IRC on freenode, participants were Edler, cordoval, and nveid, as I recall) were doing a show-and-tell of our various CMS platforms. Some were CMF backed, some were not.  Somewhere in the mix, it all started to make sense, but we have to look at this one piece at a time.

This goes beyond an API and interface for managing content

At the very core of the CMF project, it is about storage, or rather, using the appropriate form of storage. It’s about using the right tool for the job. It’s about no longer using your shoe to hammer in a nail.

We all put our content in a database, and those databases all offer a various set of low-level tools to help us insert, update, and delete content. As I have been able to understand, the CMF project is about bringing content management to a new ‘minimum standard’. Symfony in general tries to bring best practices from all walks of life into the PHP developer’s toolkit. CMF is doing that for content systems. Those crazy Java guys? They already solved this whole content storage issue.

From the linked Wikipedia article:

A JCR is a type of object database tailored to storing, searching, and retrieving hierarchical data. The JCR API grew out of the needs of content management systems, which require storing documents and other binary objects with associated metadata; however, the API is applicable to many additional types of application. In addition to object storage, the JCR provides: APIs for versioning of data; transactions; observation of changes in data; and import or export of data to XML in a standard way.


Look at all of that stuff that a JCR based content repository gives us out of the box? No wonder Lukas is pushing this. It’s right in line with the Symfony mentality of giving us a better base line situation. Re-read that quote again. Searching. Storing/retrieving hierarchal data (think folders, directories, paths, children, leafs, whatever term suits you), versions, data migration.

So we have a new way to store our data. What are the downsides? Well, currently I think the only full implementation of a JCR is Apache Jackrabbit. The CMF team is working on Jackalope (which is working, but still missing several JCR features), and there is also Midgard2 (which I am unsure of it’s current level of support for the JCR spec), among others.

About that demo

What finally clicked, I think, is that the CMF demo isn’t to show us what our client’s delivered site would look or work like. The CMF demo is to show us the tip of the iceberg of what is possible with the new framework. It’s part tech demo and part inspection tool. That’s why there’s all of that confusing stuff there. It’s 50 ways of looking at the same data set. The repository. The content repository. Because the content repository is new, and we will want to poke around at it, and see what happens when we do various things to it. It’s the proving ground, not the polish.

Now I am excited.


  1. Lukas

    Yes, but just to elaborate. There are other implementations of JCR besides Jackrabbit, but Jackrabbit is the reference implementation and one of the most sophisticated implementations. More over it offers a very nice HTTP interface which makes interfacing it with PHP very nice and clean. And so we created an implementation of PHPCR that talks to Jackrabbit. In this setup you will have native PHP classes implementing native PHP interfaces, but you will indeed need to run Jackrabbit somewhere which will require Java on that server. But installing Jackrabbit means downloading a jar and then calling “java -jar jackrabbit.jar”.

    At the same time the other implementations which do not require Java at all. As you mentioned there is Midcard, which is written in C. And there is a Doctrine DBAL implementation which just requires an RDBMS (Sqlite, MySql, PostgreSQL are currently supported). And yes indeed we dont yet support all features of PHPCR, but we are pretty close to covering all the main use cases.

    Now for the sandbox, yes it is a tech demo. Its not meant to be an example CMS, its meant to show what we currently have in terms of features. One big feature missing is a clean backend admin tool to create new content, new routes and new menu items. As we currently only have SonataAdminBundle integration for backend editing, this is what we are using in the sandbox .. for now. But the good news is that Liip just days ago assigned a budget to do some more work on the editing capabilities until the end of the year. Others are also working on improvements there .. and hopefully soon you too! 🙂


    • Jacob Mather


      Thanks for the reply. Glad to see I was mostly on track with things.

      I hope my post here helps others grasp exactly what the CMF project is, and helps lower the barrier to entry by being less confused about what is being presented.

      To everyone: If there’s any other questions, please feel free to use the comment area to get answers. I will be more than happy to update the post to reflect corrected information and/or expand the content.


  2. cordoval

    jj i think you got it right. I hope to see more inroads of this kind to explain and make plain the CMF entry view of a dev.

    Thanks for the light shed on this topic.


Leave a Reply