SlideShare une entreprise Scribd logo
1  sur  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]

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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?
 

Dernier

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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Dernier (20)

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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

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!