Symfony2 Content Management Framework
Le retour d'experience sur le site CRM du groupe Bel nos-bel-idees.fr


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.

About Alexis Janvier
Twitter: @alexisjanvier
Alexis est Lead Developer Php au sein de l'agence Rapp depuis maintenant 2 ans.
Introduction to the Symfony2 CMF
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
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 = user controlled...
Content
Content Management = user controlled...
Menu structure
Content Management = user controlled...
URLs (Routes)
Content Management = user controlled...
Page structure (to some extent)
Symfony2 CMF Project
Diagrams
An overview with lots of pictures.
Symfony2 Control Flow
Â

Symfony2 Control Flow
CMF additions

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

Utility services
Publish Workflow
- Reusing security component with custom voters
- Hooked into Symfony2 security
- Hooked into DynamicRouter
Media bundle
- Handle images and other files
- Tie in with storage and various other media services
Frontend Editing: Create.js
- backbone.js based editing framework
- Uses RDF annotations to detect editable data
- Integrates ckeditor
- Symfony2 integration for saving data via REST

Backend: Sonata PHPCR ODM Admin
- Based on the SonataAdminBundle
- Supports tree oriented data

Some words on storage
Doctrine PHPCR ODM
PHP Content Repository + Doctrine ODM
PHPCR (aka PHP-ified JCR specification)
Like MongoDB / CouchDB ODM
but different
- Includes tree/graph structure
- Translated documents
- Versioning
- Access control
- Node and subtree locking
- and more

- 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.
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
Le retour d'experience sur
nos-bel-idees.fr

Le projet
Le site "Nos Bel Idées" est le site CRM (Customer Relationship Management, ou gestion de la relation client) du groupe Bel.
Les deux objectifs principaux fixés par le client étaient :
- 1) L’acquisition de nouveaux utilisateurs
- 2) La qualification de ces utilisateurs
Pour cela, le site devait mobiliser plusieurs type de contenu, existant ou à créer :
- des bons de réduction -
