![Page 1: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/1.jpg)
Symfony CMFun nuovo paradigma per la gestione dei contenuti
![Page 2: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/2.jpg)
Symfony CMFun nuovo paradigma per la gestione dei contenuti
buon
![Page 3: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/3.jpg)
Symfony CMFun nuovo paradigma per la gestione dei contenuti
buon
approccio
![Page 4: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/4.jpg)
http://phpday.it #phpday
?
![Page 5: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/5.jpg)
http://phpday.it #phpday
CMS are awesome!
![Page 6: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/6.jpg)
http://phpday.it #phpday
No REALLY!CMSes are awesome!
![Page 7: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/7.jpg)
http://phpday.it #phpday
CMSes are awesome if you are an end user!
Click click
![Page 8: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/8.jpg)
http://phpday.it #phpday
CMSes are awesome if you are a sales guy!
Brand
![Page 9: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/9.jpg)
http://phpday.it #phpday
CMSes sucks if you are a developer!
CMS first, framework second
![Page 10: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/10.jpg)
http://phpday.it #phpday
CMSes nightmares• no clean separation of configuration, logic and content
• no clean deployment and staging concept
• inconsistent cache layers
• lots of legacy baggage
• NIH (not invented here) syndrom
![Page 11: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/11.jpg)
http://phpday.it #phpday
Do we also suffer from NIH?
• Based ourselves as much on standard tools and specs
• Deliver value within a reasonable time
![Page 12: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/12.jpg)
http://phpday.it #phpday
CMF = Content Management Framework
• In other words: its a toolbox to create your own custom CMS
• Not a one size fits all, but increase code sharing
• Imagine Diem, Sympal, Apostrophe all build on the same content foundation
![Page 13: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/13.jpg)
http://phpday.it #phpday
Mission
• 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
![Page 14: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/14.jpg)
http://phpday.it #phpday
Contents
![Page 15: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/15.jpg)
http://phpday.it #phpday
Contents
![Page 16: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/16.jpg)
http://phpday.it #phpday
i18n
![Page 17: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/17.jpg)
http://phpday.it #phpday
Versioning
![Page 18: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/18.jpg)
http://phpday.it #phpday
Relational DB
![Page 19: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/19.jpg)
http://phpday.it #phpday
Architecture
content repository | Jackrabbit
![Page 20: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/20.jpg)
http://phpday.it #phpday
Content Repository
• A content repository is a generic application data “super store.”
• Can handle both small and large-scale data interactions
• Is expected to manipulate and store structured and unstructured content that vary dynamically
![Page 21: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/21.jpg)
http://phpday.it #phpday
JSR170 aka JCR1JSR283 aka JCR2
• how data are stored within the repository is identified and structured from the point of view of the client
![Page 22: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/22.jpg)
http://phpday.it #phpday
Workspaces
• Multiple workspaces, each with its own name and root node
• Is similar to a Unix file system structure
• Each workspace is independent
![Page 23: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/23.jpg)
http://phpday.it #phpday
Nodes
• Are identified by the path where are stored
• ex. id: “/my/path/under/water/fish”
• Can be created, deleted, modified, copied...
![Page 24: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/24.jpg)
http://phpday.it #phpday
Properties
• Typed attribute:
• STRING, URI, BOOLEAN, LONG, DOUBLE, DECIMAL, BINARY, DATE, NAME, PATH, WEAKREFERENCE REFERENCE
• jcr:created, jcr:mimeType
![Page 25: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/25.jpg)
http://phpday.it #phpday
Nodes
• Are typed using namespaced names
• nt:file, nt:folder...
• nt:unstructured
![Page 26: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/26.jpg)
http://phpday.it #phpday
Node Mixins
• A mixin node type can be assigned to a node during that node's lifetime
• mix:referenceable
• jcr:uuid
![Page 27: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/27.jpg)
http://phpday.it #phpday
Node Mixins
• mix:versionable
• jcr:versionHistory
• jcr:predecessors
• jcr:baseVersion
• jcr:isCheckedOut
• jcr:mergeFailed
![Page 28: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/28.jpg)
http://phpday.it #phpday
Content repositoryJava implementation
![Page 29: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/29.jpg)
http://phpday.it #phpday
Architecture
content repository | Jackrabbit
phpcr | Jackalope
![Page 30: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/30.jpg)
http://phpday.it #phpday
PHPCR
• Aims to provide a standard API that can be used by any PHP content management system to interface with any content repository.
• Several Implementations
• Jackalope on Jackrabbit
• Jackalope on Doctrine DBAL
• Midgard2 PHPCR
![Page 31: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/31.jpg)
http://phpday.it #phpday
PHPCR
• PHPCR has been submitted to JCR
• http://phpcr.github.com/
![Page 32: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/32.jpg)
http://phpday.it #phpday
![Page 33: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/33.jpg)
http://phpday.it #phpday
Architecture
content repository | Jackrabbit
phpcr | Jackalope
doctrine | phpcr-odm
![Page 34: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/34.jpg)
http://phpday.it #phpday
PHPCR-ODM
• Sits on top of jackalope
• Works like MongoDB or CouchDB ODM, but also includes a tree/graph, versioning and ACL API
![Page 35: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/35.jpg)
http://phpday.it #phpday
PHPCR-ODM
![Page 36: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/36.jpg)
http://phpday.it #phpday
Document Class
![Page 37: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/37.jpg)
http://phpday.it #phpday
Repository Class
![Page 38: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/38.jpg)
http://phpday.it #phpday
CRUD
![Page 39: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/39.jpg)
http://phpday.it #phpday
Traversal
![Page 40: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/40.jpg)
http://phpday.it #phpday
Versioning
![Page 41: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/41.jpg)
http://phpday.it #phpday
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
![Page 42: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/42.jpg)
http://phpday.it #phpday
Architecture
content repository | Jackrabbit
phpcr | Jackalope
doctrine | phpcr-odm
Sf2 | doctrinePHPCRBundle
![Page 43: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/43.jpg)
http://phpday.it #phpday
DoctrinePHPCRBundle
• Document Manager available in the DIC
![Page 44: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/44.jpg)
http://phpday.it #phpday
DEMO
![Page 45: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/45.jpg)
http://phpday.it #phpday
Roadmap
• PHPCR-ODM: @Child, @Children, @Parent, @ReferenceOne, @ReferenceMany, ...
• Make AdminBundle compatible
• Create frontend Bundles
![Page 46: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/46.jpg)
http://phpday.it #phpday
Eating your own dog food
• Ideato is rebuilding its site on top of CMF
![Page 47: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/47.jpg)
http://phpday.it #phpday
Many companies are committed to the effort
![Page 48: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/48.jpg)
http://phpday.it #phpday
Symfony CMF CampCesena, 29-30 of Julyhttp://www.unsito.com/c4
![Page 49: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/49.jpg)
http://phpday.it #phpday
Resources
• irc://freenode/#symfony-cmf
• http://cmf.symfony.com/
• https://github.com/symfony-cmf/symfony-cmf/wiki
• http://jcp.org/en/jsr/detail?id=283
• http://jcp.org/en/jsr/detail?id=333
![Page 50: Symfony CMF: un nuovo paradigma per la gestione dei contenuti](https://reader034.vdocuments.site/reader034/viewer/2022050614/54814ef9b4af9f200c8b4615/html5/thumbnails/50.jpg)
http://phpday.it #phpday
Thanks!
http://joind.in/3023
Michele Orselli Manuel Baldassarri