symfony cmf: un nuovo paradigma per la gestione dei contenuti

50
Symfony CMF un nuovo paradigma per la gestione dei contenuti

Upload: manuel-baldassarri

Post on 29-Jan-2018

1.497 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

Symfony CMFun nuovo paradigma per la gestione dei contenuti

Page 2: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

Symfony CMFun nuovo paradigma per la gestione dei contenuti

buon

Page 3: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

Symfony CMFun nuovo paradigma per la gestione dei contenuti

buon

approccio

Page 6: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

http://phpday.it #phpday

No REALLY!CMSes are awesome!

Page 7: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

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

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

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

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

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

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

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 19: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

http://phpday.it #phpday

Architecture

content repository | Jackrabbit

Page 20: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

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

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

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

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

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

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

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

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

http://phpday.it #phpday

Content repositoryJava implementation

Page 29: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

http://phpday.it #phpday

Architecture

content repository | Jackrabbit

phpcr | Jackalope

Page 30: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

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

http://phpday.it #phpday

PHPCR

• PHPCR has been submitted to JCR

• http://phpcr.github.com/

Page 33: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

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

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 41: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

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

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

http://phpday.it #phpday

DoctrinePHPCRBundle

• Document Manager available in the DIC

Page 45: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

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

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

http://phpday.it #phpday

Many companies are committed to the effort

Page 48: Symfony CMF: un nuovo paradigma per la gestione dei contenuti

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

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