1/30

Symfony2

Content Management Framework


cmf.symfony.com

About David Buchmann

Twitter: @dbu

David is a senior developper at Liip SA, specializing in Symfony2. He happens to also be a certified Scrum Master and sometimes enjoys doing the scrum master or product owner role for a project.

Liip is doing custom web development with PHP in Switzerland.

The Symfony CMF project makes it easier for developers to add CMS functionality to applications built with the Symfony2 PHP framework. Key development principles for the provided set of bundles are scalability, usability, documentation and testing

CMF = Content Management Framework

  • A toolbox to create your own custom CMS
  • Not a ready-to-use application for end users
  • Not a one size fits all, but increase code sharing
    • Use what you can
    • Replace what you need
    • Ignore what you do not need

  • Imagine Drupal, ezPublish, Diem, Sympal all build on the same content foundation

Do we suffer from NIH?

  • Collaboration with Drupal and other frameworks to share basic content management code
  • Based ourselves on standard tools and specs
  • Leverage existing bundles and technologies of the Symfony and web world

Content Management means

user controlled...

  • Content: Createjs frontend editing, Sonata admin
  • Menu structure: Provider for KnpMenuBundle
  • Routes (URLs): RoutingExtraBundle together with Drupal
  • Page structure (to some extent): Block bundle based on Sonata BlockBundle

Welcome to the real world


At Quiet Storm Solutions, a UK based B2B marketing specialists, we are successfully utilizing the CMF and Jackalope Doctrine-Dbal to drive our newly launched Saas CRM service.
Pete Sisson


  • ServerGrove is using the PHP content repository in their KnowledgeBase tool.
  • Liip integrated the CMF as a simple editing solution into Symfony web applications like www.barometredesprix.ch.
  • Eat your own dog food: The Liip website is built on top of the CMF

Play with it today!

CMF sandbox online demo


Get the CMF sandbox on github

Symfony2 CMF Project


Diagrams

An overview with lots of pictures.

Symfony2 Control Flow

 


Symfony2 Control Flow

CMF additions


At a glance


Routing

  • ChainRouter allows to have several routers in action
  • DynamicRouter for user-defined routes from a data store
  • Specifies controller and page content to use
  • Or just the template instead of controller (with the ContentBundle)

Content Bundle

  • Provides generic controller so you need only a custom template
  • Simple StaticContent model and template

Menu Bundle

  • Integrate KnpMenuBundle with Doctrine
  • Menu documents reference content documents
  • Generates URL for content

Block: Sonata PHPCR ODM BlockBundle

  • Based on the SonataBlockBundle
  • Multiple blocks per page
  • Blocks can be reused on different page

Frontend Editing: Create.js

  • backbone.js based editing framework
  • Uses RDF annotations to detect editable data
  • Comes with hallo.js for contentEditable
  • Symfony2 integration for saving data via REST

Backend: Sonata PHPCR ODM Admin

  • Based on the SonataAdminBundle
  • Supports tree oriented data

Other related Bundles

  • SymfonyCmfSearchBundle (content search, extends LiipSearchBundle)
  • SymfonyCmfSimpleCmsBundle (a simple CMS incl. content authoring)
  • LuneticsLocaleBundle (automatic locale detection)
  • Planning integration with several more Sonata Bundles

Some words on storage

Doctrine PHPCR ODM

PHP Content Repository + Doctrine ODM

PHPCR (aka PHP-ified JCR specification)

Like MongoDB or CouchDB ODM but different

  • Includes tree/graph structure
  • Translated documents
  • Versioning
  • Access control
  • Node and subtree locking
  • and more

PHPCR and the ODM

  • PHP Content Repositories API specification
  • Graph-based, schema-less, versioning document database

  • Doctrine PHPCR ODM: map nodes to your objects
  • Add features like multilanguage

PHPCR provides a standardized API that can be used by any PHP content management system to interface with any content repository.

PHPCR has been submitted to the JCR spec at the request of David Nüschler, JCR spec lead

Not all data fits well in PHPCR/JCR

  • For example aggregation is better done in an RDBMS
  • Store web store product description in PHPCR/JCR
  • Store web store inventory and orders in RDBMS

Next steps as of january 2013

  • Improve the CMF documentation
  • Frontend editing: Finalize collection support of create.js to add new items
  • Clean Jackalope import and export commands to have reliable backups
  • We hope to tag stable releases around the time Symfony 2.2 is released

Constantly moving... The best entry point to see what is going on right now is the CMF Roadmap

Thank you!


Please give feedback on joind.in/7799


Contact me on IRC or Twitter @dbu