SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Symfony CMF What &  Why Jacopo Romei
Jacopo Romei Agile coach 2005 PHP developer 1999 @jacoporomei Symfony2 CMF 2011 since Opensource Symfony1 patches
Tool for developers Not for final users ?
Impedence mismatch NoSQL OOP RDBMS
 
CMS Drupal Devil is in the details Interaction EZ Publish Not Data/Behavior containers Real OOP  architecture
Immagine lord of the rings
The F in CM F 1. a : a basic conceptional structure (as of ideas) b : a skeletal,  openwork , or structural frame 2. the larger branches of a tree that determine its  shape   -- Merriam-Webster Dictionary
Technical  debt Refactoring Legacy code Short term Long term Skill
Frameworks create technical debt
CMS systems create more
Common ground Drupal Symfony2 HTTP Foundation Use at will tools
PHPCR Standardized API Core Implementation agnostic JCR Officially in 2.1 specs
PHPCR in the wild Midgard2 Jackalope Doctrine DBAL MongoDB Jackrabbit
PHPCR Features Tree access Access by UUID Search nodes Versioning XML import (*) and export Locking (*) & Transactions Permissions & Access Control (*) Observation (*) (*) ask the speaker
PHPCR Hierarchical storage Workspaces Nodes Properties Primary node types Mixin node types Tree Multiple roots Indipendent trees Unique path Namespaced Types String, URI, bool, long, double, decimal, binary, date, name, path, (weak)reference Folder, file, unstructured, custom Traits PHP5.4? Runtime Mix:referenceable, mix:versionable
Keynote
Keynote Hey! Show us some code! You are a nerd and so we are!
$factory = new ackalopeepositoryFactoryJackrabbit(); $parameters = array( 'jackalope.jackrabbit_uri' => 'http://localhost:8080/server' ); // end of implementation specific configuration // $repository = $factory->getRepository($parameters); $creds = new HPCRimpleCredentials('user','pw'); $session = $repository->login($creds, 'default'); Connect
$root = $session->getRootNode(); // Node always added as child of another node $node = $root->addNode('test', 'nt:unstructured'); // Create or update a property $node->setProperty('prop', 'value'); // Persist the changes $session->save(); // Delete a node and all its children $node->remove(); $session->save(); CRUD
$node = $session->getNode('/site/content'); foreach ($node->getChildren() as $child) { var_dump($child->getName()); } // or in short foreach ($node as $child) { var_dump($child->getName()); } // filter on node names foreach ($node->getChildren('di*') as $child) { var_dump($child->getName()); };   Tree API
$node = $session->getNode('/site/content/about'); $i = 0; $breadcrumb = array(); // note this code doesn't handle graphs do { $i++; $parent = $node->getAncestor($i); $breadcrumb[$parent->getPath()] = $parent->getPropertyValue('label'); } while ($parent != $node);   Tree API 2
// make versionable $node = $session->getNode('/site/content/about'); $node->addMixin('mix:versionable'); $session->save(); $vm = $session->getWorkspace()->getVersionManager() // create initial version $node->setProperty('label', 'About'); $session->save(); $vm->checkpoint($node->getPath()); Versioning
// update version $node->setProperty('label', 'Ups'); $session->save(); $vm->checkpoint($node->getPath()); $base = $vm->getBaseVersion($node->getPath()); $previous = array_pop($base->getPredecessors()); $vm->restore(true, $previous->getName(), $node->getPath() ); Versioning 2
$queryManager = $workspace->getQueryManager(); $sql = "SELECT * FROM [nt:unstructured] WHERE [nt:unstructured].type = 'nav' ORDER BY [nt:unstructured].title"; $query = $queryManager->createQuery($sql, 'JCR-SQL2'); $query->setLimit($limit); $query->setOffset($offset); $queryResult = $query->execute(); foreach ($queryResult->getNodes() as $node) { var_dump($node->getPath()); }; SQL2
PHPCR  ODM
 
/** @PHPCRocument(alias="nav", repositoryClass="NavigationRepository") */ class Navigation { /** @PHPCRd(strategy="repository") */ public $id; /** @PHPCRhildren */ public $children; /** @PHPCRtring(name="label") */ private $label; private $internal; ... }; Document class
// Create $doc = new Navigation(); $doc->setLabel($label); // no active record. newly created document needs // to be registered it with the document manager $docManager->persist($doc); $docManager->flush(); $id = $doc->id; CRUD
// Read $repo = $docManager->getRepository('Navigation'); $doc = $repo->find($id); // Update $doc->setLabel('home'); // no need to call persist() here, document already known $docManager->flush(); // Remove $docManager->remove($doc); $docManager->flush(); CRUD 2
reloaded Impedance mismatch PHPCR is no silver bullet Reports on RDBMS To each its own Unstructured data on PHPCR Reports on RDBMS Product price Product description
PHP Community Driving OS projects Growth 90's Skills Symfony2 since Opensource
beberlei (Benjamin Eberlei) bergie (Henri Bergius) brki (Brian King) chirimoya (Thomas Schedler) chregu (Christian Stocker) dbu (David Buchmann) ebi (Tobias Ebnöther) jakuza (Jacopo Romei) justinrainbow (Justin Rainbow) k-fish (Karsten Dambekalns) lapistano (Bastian Feder) lsmith77 (Lukas K. Smith) – Slides! micheleorselli (Michele Orselli) nacmartin (Nacho Martín) nicam (Pascal Helfenstein) ornicar (Thibault Duplessis) piotras robertlemke (Robert Lemke) rndstr (Roland Schilter) Seldaek (Jordi Boggiano) sixty-nine (Daniel Barsotti) uwej711 (Uwe Jäger) vedranzgela (Vedran Zgela)
Bundles PHPCRBrowserBundle TreeBundle SonataDoctrinePhpcrAdminBundle Decoupled Powerful ChainRoutingBundle PHPCRBrowserBundle NavigationBundle ContentBundle
Technical  debt Refactoring Legacy code Short term Long term Skill
Symfony CMF wants  you
Gift!
__ row, __ seat. Gift!
Thank you
Jacopo Romei [email_address]

Weitere ähnliche Inhalte

Was ist angesagt?

Slim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutSlim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutVic Metcalfe
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overviewjsmith92
 
Keeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro FrameworkKeeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro FrameworkJeremy Kendall
 
PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)Win Yu
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and othersYusuke Wada
 
Keeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkKeeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkJeremy Kendall
 
SPL: The Missing Link in Development
SPL: The Missing Link in DevelopmentSPL: The Missing Link in Development
SPL: The Missing Link in Developmentjsmith92
 
Zephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsZephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsMark Baker
 
Using the new WordPress REST API
Using the new WordPress REST APIUsing the new WordPress REST API
Using the new WordPress REST APICaldera Labs
 

Was ist angesagt? (20)

Intermediate PHP
Intermediate PHPIntermediate PHP
Intermediate PHP
 
Slim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutSlim RedBeanPHP and Knockout
Slim RedBeanPHP and Knockout
 
Mojo as a_client
Mojo as a_clientMojo as a_client
Mojo as a_client
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overview
 
Keeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro FrameworkKeeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro Framework
 
Developing apps using Perl
Developing apps using PerlDeveloping apps using Perl
Developing apps using Perl
 
Current state-of-php
Current state-of-phpCurrent state-of-php
Current state-of-php
 
PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)PHP 良好實踐 (Best Practice)
PHP 良好實踐 (Best Practice)
 
Ant
Ant Ant
Ant
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and others
 
Perl5i
Perl5iPerl5i
Perl5i
 
Keeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkKeeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro framework
 
SPL: The Missing Link in Development
SPL: The Missing Link in DevelopmentSPL: The Missing Link in Development
SPL: The Missing Link in Development
 
Lithium Best
Lithium Best Lithium Best
Lithium Best
 
PHP POWERPOINT SLIDES
PHP POWERPOINT SLIDESPHP POWERPOINT SLIDES
PHP POWERPOINT SLIDES
 
4.2 PHP Function
4.2 PHP Function4.2 PHP Function
4.2 PHP Function
 
Zephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensionsZephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensions
 
Using PHP
Using PHPUsing PHP
Using PHP
 
PHP for hacks
PHP for hacksPHP for hacks
PHP for hacks
 
Using the new WordPress REST API
Using the new WordPress REST APIUsing the new WordPress REST API
Using the new WordPress REST API
 

Andere mochten auch (7)

JORNADA SOBRE ELS AVANTATGES DEL “NÚVOL”
JORNADA SOBRE ELS AVANTATGES DEL “NÚVOL”JORNADA SOBRE ELS AVANTATGES DEL “NÚVOL”
JORNADA SOBRE ELS AVANTATGES DEL “NÚVOL”
 
test+power+point
test+power+pointtest+power+point
test+power+point
 
Talleres 2
Talleres 2Talleres 2
Talleres 2
 
iModela で モコモコ立体を作る
iModela で モコモコ立体を作るiModela で モコモコ立体を作る
iModela で モコモコ立体を作る
 
Multiples canales
Multiples canalesMultiples canales
Multiples canales
 
Elgoibarkoa
ElgoibarkoaElgoibarkoa
Elgoibarkoa
 
Animaliak
AnimaliakAnimaliak
Animaliak
 

Ähnlich wie Symfony CMF What Why Framework Content Management

Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy CodeRowan Merewood
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207patter
 
Zend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolZend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolGordon Forsythe
 
DDD on example of Symfony (Webcamp Odessa 2014)
DDD on example of Symfony (Webcamp Odessa 2014)DDD on example of Symfony (Webcamp Odessa 2014)
DDD on example of Symfony (Webcamp Odessa 2014)Oleg Zinchenko
 
How to learn to build your own PHP framework
How to learn to build your own PHP frameworkHow to learn to build your own PHP framework
How to learn to build your own PHP frameworkDinh Pham
 
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.frameworkHanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.frameworkNguyen Duc Phu
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkDirk Haun
 
Introducing PHP Latest Updates
Introducing PHP Latest UpdatesIntroducing PHP Latest Updates
Introducing PHP Latest UpdatesIftekhar Eather
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐいHisateru Tanaka
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Stephan Schmidt
 
PHP: The easiest language to learn.
PHP: The easiest language to learn.PHP: The easiest language to learn.
PHP: The easiest language to learn.Binny V A
 
Php on the desktop and php gtk2
Php on the desktop and php gtk2Php on the desktop and php gtk2
Php on the desktop and php gtk2Elizabeth Smith
 

Ähnlich wie Symfony CMF What Why Framework Content Management (20)

PHP 5 Sucks. PHP 5 Rocks.
PHP 5 Sucks. PHP 5 Rocks.PHP 5 Sucks. PHP 5 Rocks.
PHP 5 Sucks. PHP 5 Rocks.
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207
 
Zend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolZend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_Tool
 
DDD on example of Symfony (Webcamp Odessa 2014)
DDD on example of Symfony (Webcamp Odessa 2014)DDD on example of Symfony (Webcamp Odessa 2014)
DDD on example of Symfony (Webcamp Odessa 2014)
 
How to learn to build your own PHP framework
How to learn to build your own PHP frameworkHow to learn to build your own PHP framework
How to learn to build your own PHP framework
 
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.frameworkHanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
 
Symfony2 - OSIDays 2010
Symfony2 - OSIDays 2010Symfony2 - OSIDays 2010
Symfony2 - OSIDays 2010
 
Symfony2 - WebExpo 2010
Symfony2 - WebExpo 2010Symfony2 - WebExpo 2010
Symfony2 - WebExpo 2010
 
Symfony2 - WebExpo 2010
Symfony2 - WebExpo 2010Symfony2 - WebExpo 2010
Symfony2 - WebExpo 2010
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application Framework
 
Introducing PHP Latest Updates
Introducing PHP Latest UpdatesIntroducing PHP Latest Updates
Introducing PHP Latest Updates
 
Doctrine and NoSQL
Doctrine and NoSQLDoctrine and NoSQL
Doctrine and NoSQL
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
 
Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5Go OO! - Real-life Design Patterns in PHP 5
Go OO! - Real-life Design Patterns in PHP 5
 
Fatc
FatcFatc
Fatc
 
PHP: The easiest language to learn.
PHP: The easiest language to learn.PHP: The easiest language to learn.
PHP: The easiest language to learn.
 
Doctrine for NoSQL
Doctrine for NoSQLDoctrine for NoSQL
Doctrine for NoSQL
 
Php on the desktop and php gtk2
Php on the desktop and php gtk2Php on the desktop and php gtk2
Php on the desktop and php gtk2
 

Mehr von Jacopo Romei

Silicon doesn’t sweat
Silicon doesn’t sweatSilicon doesn’t sweat
Silicon doesn’t sweatJacopo Romei
 
WebDeLDN - The outsourcing Veil of Maya
WebDeLDN - The outsourcing Veil of MayaWebDeLDN - The outsourcing Veil of Maya
WebDeLDN - The outsourcing Veil of MayaJacopo Romei
 
If you know where it will end up, it's not innovative enough - CloudConf 2017
If you know where it will end up, it's not innovative enough - CloudConf 2017If you know where it will end up, it's not innovative enough - CloudConf 2017
If you know where it will end up, it's not innovative enough - CloudConf 2017Jacopo Romei
 
Negotiating contracts as user experiences - WIAD Rome 2016
Negotiating contracts as user experiences - WIAD Rome 2016Negotiating contracts as user experiences - WIAD Rome 2016
Negotiating contracts as user experiences - WIAD Rome 2016Jacopo Romei
 
LiquidO - No management from the trenches - Agile Saturday - October 2014, Ta...
LiquidO - No management from the trenches - Agile Saturday - October 2014, Ta...LiquidO - No management from the trenches - Agile Saturday - October 2014, Ta...
LiquidO - No management from the trenches - Agile Saturday - October 2014, Ta...Jacopo Romei
 
LiquidO™ - Mini IAD Trento
LiquidO™ - Mini IAD TrentoLiquidO™ - Mini IAD Trento
LiquidO™ - Mini IAD TrentoJacopo Romei
 
Agile Saturday #10 - Liquid Organization: Anti-Fragility Beyond Design
Agile Saturday #10 - Liquid Organization: Anti-Fragility Beyond DesignAgile Saturday #10 - Liquid Organization: Anti-Fragility Beyond Design
Agile Saturday #10 - Liquid Organization: Anti-Fragility Beyond DesignJacopo Romei
 
Capitalismo distribuito: tutto quello che sfuggì a zio Karl e che non deve sf...
Capitalismo distribuito: tutto quello che sfuggì a zio Karl e che non deve sf...Capitalismo distribuito: tutto quello che sfuggì a zio Karl e che non deve sf...
Capitalismo distribuito: tutto quello che sfuggì a zio Karl e che non deve sf...Jacopo Romei
 
Grab yourself an alibi - PHPDay 2013
Grab yourself an alibi - PHPDay 2013Grab yourself an alibi - PHPDay 2013
Grab yourself an alibi - PHPDay 2013Jacopo Romei
 
Looking for the right swan - LESS2012
Looking for the right swan - LESS2012Looking for the right swan - LESS2012
Looking for the right swan - LESS2012Jacopo Romei
 
Cercando il cigno giusto - AgileDay 2012
Cercando il cigno giusto - AgileDay 2012Cercando il cigno giusto - AgileDay 2012
Cercando il cigno giusto - AgileDay 2012Jacopo Romei
 
Cercando il cigno giusto
Cercando il cigno giustoCercando il cigno giusto
Cercando il cigno giustoJacopo Romei
 
Test Driven Development with Symfony2
Test Driven Development with Symfony2Test Driven Development with Symfony2
Test Driven Development with Symfony2Jacopo Romei
 
Many to many: no man is an island
Many to many: no man is an islandMany to many: no man is an island
Many to many: no man is an islandJacopo Romei
 
Many to many: no man is an island
Many to many: no man is an islandMany to many: no man is an island
Many to many: no man is an islandJacopo Romei
 
Let it flow, let it flow, let it flow!
Let it flow, let it flow, let it flow!Let it flow, let it flow, let it flow!
Let it flow, let it flow, let it flow!Jacopo Romei
 
Project manager e sviluppo agile: separati in casa?
Project manager e sviluppo agile: separati in casa?Project manager e sviluppo agile: separati in casa?
Project manager e sviluppo agile: separati in casa?Jacopo Romei
 
Project manager e sviluppo agile: separati in casa?
Project manager e sviluppo agile: separati in casa?Project manager e sviluppo agile: separati in casa?
Project manager e sviluppo agile: separati in casa?Jacopo Romei
 

Mehr von Jacopo Romei (20)

Silicon doesn’t sweat
Silicon doesn’t sweatSilicon doesn’t sweat
Silicon doesn’t sweat
 
WebDeLDN - The outsourcing Veil of Maya
WebDeLDN - The outsourcing Veil of MayaWebDeLDN - The outsourcing Veil of Maya
WebDeLDN - The outsourcing Veil of Maya
 
If you know where it will end up, it's not innovative enough - CloudConf 2017
If you know where it will end up, it's not innovative enough - CloudConf 2017If you know where it will end up, it's not innovative enough - CloudConf 2017
If you know where it will end up, it's not innovative enough - CloudConf 2017
 
Negotiating contracts as user experiences - WIAD Rome 2016
Negotiating contracts as user experiences - WIAD Rome 2016Negotiating contracts as user experiences - WIAD Rome 2016
Negotiating contracts as user experiences - WIAD Rome 2016
 
LiquidO - No management from the trenches - Agile Saturday - October 2014, Ta...
LiquidO - No management from the trenches - Agile Saturday - October 2014, Ta...LiquidO - No management from the trenches - Agile Saturday - October 2014, Ta...
LiquidO - No management from the trenches - Agile Saturday - October 2014, Ta...
 
LiquidO™ - Mini IAD Trento
LiquidO™ - Mini IAD TrentoLiquidO™ - Mini IAD Trento
LiquidO™ - Mini IAD Trento
 
Agile Saturday #10 - Liquid Organization: Anti-Fragility Beyond Design
Agile Saturday #10 - Liquid Organization: Anti-Fragility Beyond DesignAgile Saturday #10 - Liquid Organization: Anti-Fragility Beyond Design
Agile Saturday #10 - Liquid Organization: Anti-Fragility Beyond Design
 
Capitalismo distribuito: tutto quello che sfuggì a zio Karl e che non deve sf...
Capitalismo distribuito: tutto quello che sfuggì a zio Karl e che non deve sf...Capitalismo distribuito: tutto quello che sfuggì a zio Karl e che non deve sf...
Capitalismo distribuito: tutto quello che sfuggì a zio Karl e che non deve sf...
 
Grab yourself an alibi - PHPDay 2013
Grab yourself an alibi - PHPDay 2013Grab yourself an alibi - PHPDay 2013
Grab yourself an alibi - PHPDay 2013
 
Looking for the right swan - LESS2012
Looking for the right swan - LESS2012Looking for the right swan - LESS2012
Looking for the right swan - LESS2012
 
Cercando il cigno giusto - AgileDay 2012
Cercando il cigno giusto - AgileDay 2012Cercando il cigno giusto - AgileDay 2012
Cercando il cigno giusto - AgileDay 2012
 
Cercando il cigno giusto
Cercando il cigno giustoCercando il cigno giusto
Cercando il cigno giusto
 
Debito Tecnico
Debito TecnicoDebito Tecnico
Debito Tecnico
 
Refactoring
RefactoringRefactoring
Refactoring
 
Test Driven Development with Symfony2
Test Driven Development with Symfony2Test Driven Development with Symfony2
Test Driven Development with Symfony2
 
Many to many: no man is an island
Many to many: no man is an islandMany to many: no man is an island
Many to many: no man is an island
 
Many to many: no man is an island
Many to many: no man is an islandMany to many: no man is an island
Many to many: no man is an island
 
Let it flow, let it flow, let it flow!
Let it flow, let it flow, let it flow!Let it flow, let it flow, let it flow!
Let it flow, let it flow, let it flow!
 
Project manager e sviluppo agile: separati in casa?
Project manager e sviluppo agile: separati in casa?Project manager e sviluppo agile: separati in casa?
Project manager e sviluppo agile: separati in casa?
 
Project manager e sviluppo agile: separati in casa?
Project manager e sviluppo agile: separati in casa?Project manager e sviluppo agile: separati in casa?
Project manager e sviluppo agile: separati in casa?
 

Kürzlich hochgeladen

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Symfony CMF What Why Framework Content Management

  • 1. Symfony CMF What & Why Jacopo Romei
  • 2. Jacopo Romei Agile coach 2005 PHP developer 1999 @jacoporomei Symfony2 CMF 2011 since Opensource Symfony1 patches
  • 3. Tool for developers Not for final users ?
  • 5.  
  • 6. CMS Drupal Devil is in the details Interaction EZ Publish Not Data/Behavior containers Real OOP architecture
  • 7. Immagine lord of the rings
  • 8. The F in CM F 1. a : a basic conceptional structure (as of ideas) b : a skeletal, openwork , or structural frame 2. the larger branches of a tree that determine its shape -- Merriam-Webster Dictionary
  • 9. Technical debt Refactoring Legacy code Short term Long term Skill
  • 12. Common ground Drupal Symfony2 HTTP Foundation Use at will tools
  • 13. PHPCR Standardized API Core Implementation agnostic JCR Officially in 2.1 specs
  • 14. PHPCR in the wild Midgard2 Jackalope Doctrine DBAL MongoDB Jackrabbit
  • 15. PHPCR Features Tree access Access by UUID Search nodes Versioning XML import (*) and export Locking (*) & Transactions Permissions & Access Control (*) Observation (*) (*) ask the speaker
  • 16. PHPCR Hierarchical storage Workspaces Nodes Properties Primary node types Mixin node types Tree Multiple roots Indipendent trees Unique path Namespaced Types String, URI, bool, long, double, decimal, binary, date, name, path, (weak)reference Folder, file, unstructured, custom Traits PHP5.4? Runtime Mix:referenceable, mix:versionable
  • 18. Keynote Hey! Show us some code! You are a nerd and so we are!
  • 19. $factory = new ackalopeepositoryFactoryJackrabbit(); $parameters = array( 'jackalope.jackrabbit_uri' => 'http://localhost:8080/server' ); // end of implementation specific configuration // $repository = $factory->getRepository($parameters); $creds = new HPCRimpleCredentials('user','pw'); $session = $repository->login($creds, 'default'); Connect
  • 20. $root = $session->getRootNode(); // Node always added as child of another node $node = $root->addNode('test', 'nt:unstructured'); // Create or update a property $node->setProperty('prop', 'value'); // Persist the changes $session->save(); // Delete a node and all its children $node->remove(); $session->save(); CRUD
  • 21. $node = $session->getNode('/site/content'); foreach ($node->getChildren() as $child) { var_dump($child->getName()); } // or in short foreach ($node as $child) { var_dump($child->getName()); } // filter on node names foreach ($node->getChildren('di*') as $child) { var_dump($child->getName()); }; Tree API
  • 22. $node = $session->getNode('/site/content/about'); $i = 0; $breadcrumb = array(); // note this code doesn't handle graphs do { $i++; $parent = $node->getAncestor($i); $breadcrumb[$parent->getPath()] = $parent->getPropertyValue('label'); } while ($parent != $node); Tree API 2
  • 23. // make versionable $node = $session->getNode('/site/content/about'); $node->addMixin('mix:versionable'); $session->save(); $vm = $session->getWorkspace()->getVersionManager() // create initial version $node->setProperty('label', 'About'); $session->save(); $vm->checkpoint($node->getPath()); Versioning
  • 24. // update version $node->setProperty('label', 'Ups'); $session->save(); $vm->checkpoint($node->getPath()); $base = $vm->getBaseVersion($node->getPath()); $previous = array_pop($base->getPredecessors()); $vm->restore(true, $previous->getName(), $node->getPath() ); Versioning 2
  • 25. $queryManager = $workspace->getQueryManager(); $sql = "SELECT * FROM [nt:unstructured] WHERE [nt:unstructured].type = 'nav' ORDER BY [nt:unstructured].title"; $query = $queryManager->createQuery($sql, 'JCR-SQL2'); $query->setLimit($limit); $query->setOffset($offset); $queryResult = $query->execute(); foreach ($queryResult->getNodes() as $node) { var_dump($node->getPath()); }; SQL2
  • 27.  
  • 28. /** @PHPCRocument(alias="nav", repositoryClass="NavigationRepository") */ class Navigation { /** @PHPCRd(strategy="repository") */ public $id; /** @PHPCRhildren */ public $children; /** @PHPCRtring(name="label") */ private $label; private $internal; ... }; Document class
  • 29. // Create $doc = new Navigation(); $doc->setLabel($label); // no active record. newly created document needs // to be registered it with the document manager $docManager->persist($doc); $docManager->flush(); $id = $doc->id; CRUD
  • 30. // Read $repo = $docManager->getRepository('Navigation'); $doc = $repo->find($id); // Update $doc->setLabel('home'); // no need to call persist() here, document already known $docManager->flush(); // Remove $docManager->remove($doc); $docManager->flush(); CRUD 2
  • 31. reloaded Impedance mismatch PHPCR is no silver bullet Reports on RDBMS To each its own Unstructured data on PHPCR Reports on RDBMS Product price Product description
  • 32. PHP Community Driving OS projects Growth 90's Skills Symfony2 since Opensource
  • 33. beberlei (Benjamin Eberlei) bergie (Henri Bergius) brki (Brian King) chirimoya (Thomas Schedler) chregu (Christian Stocker) dbu (David Buchmann) ebi (Tobias Ebnöther) jakuza (Jacopo Romei) justinrainbow (Justin Rainbow) k-fish (Karsten Dambekalns) lapistano (Bastian Feder) lsmith77 (Lukas K. Smith) – Slides! micheleorselli (Michele Orselli) nacmartin (Nacho Martín) nicam (Pascal Helfenstein) ornicar (Thibault Duplessis) piotras robertlemke (Robert Lemke) rndstr (Roland Schilter) Seldaek (Jordi Boggiano) sixty-nine (Daniel Barsotti) uwej711 (Uwe Jäger) vedranzgela (Vedran Zgela)
  • 34. Bundles PHPCRBrowserBundle TreeBundle SonataDoctrinePhpcrAdminBundle Decoupled Powerful ChainRoutingBundle PHPCRBrowserBundle NavigationBundle ContentBundle
  • 35. Technical debt Refactoring Legacy code Short term Long term Skill
  • 37. Gift!
  • 38. __ row, __ seat. Gift!