SlideShare una empresa de Scribd logo
1 de 23
Descargar para leer sin conexión
Symfony'and'eZ'Publish
                                         Let’s&have&a&trip&together




                          Jérôme Vieilledent - Software engineer / http://ez.no / http://share.ez.no
vendredi 30 novembre 12
Genesis of the Symfony aspects




vendredi 30 novembre 12

eZ Publish 4 released in 2007. More a PHP5 adaptation than a real rewrite.
We added features during these years of course, but the main base code
kept unchanged.

Several attempts were initiated for a complete rewrite (back in 2008 with eZ
Components) but the real project began in mid-2010 with a complete re-
thinking of our core business API.
Requirements



     • Easily integrate our API

     • HMVC (Hierarchical Model View Controller) stack

     • Decoupled components

     • Dependency injection
     •    New template engine

     • Extensible, Open, Reliable ;-)




vendredi 30 novembre 12

API : Working on it for more than a year at that time. Complete rewrite of
what makes our core business logic. It’s using DI, but without any container
or any dependency from out there. Completely independent
HMVC : In our old model we kind of used MVC, but flawed by too much logic
in the view (fetch functions). We needed something that fixes both our
needs (trigger some logic from the view) and the MVC model
Decoupled + DI : Keep our independency (API is purely independent lib)
Templates : Our template engine was way too old, with edge case bugs,
very hard to maintain. Plus we wanted flexibility, like being able to easily
switch from one engine to another.
Get rid of the (old) monolith




vendredi 30 novembre 12

And of course our approach was monolithic (legacy PHP 4 ages, weak OO
model).
Lots of extension points, but interdependent, impossible to decouple,
impossible to test properly (singletons everywhere)
Get rid of the (old) monolith




vendredi 30 novembre 12

And of course our approach was monolithic (legacy PHP 4 ages, weak OO
model).
Lots of extension points, but interdependent, impossible to decouple,
impossible to test properly (singletons everywhere)
Useful things start in a bar




vendredi 30 novembre 12

Lisbon conference, almost all eZ engineering, in an informal beer meeting
(probably the best way to make meetings ever). Community guys were here
too. We became to chat about what would be eZ Publish 5 (after some more
beers, so that we were too drunk to fight).
Sharing one’s experiences with Twig, Symfony2, Zeta... We started to
imagine how would the paper gift around eZ Publish API would be
Options



     • Home made
     • Zeta Components
     • Zend Framework 2
     • Symfony 2




vendredi 30 novembre 12

Home made : Why would we do that ? Too much work for what ? Doing the
same mistakes than in the past, just because otherwise it would be «not
invented here» ? No
Zeta Components : eZ has a long story with them. Back in 2008-2009, their
destiny was to become the next generation of eZ Publish. For several
reasons it didn’t happen. And to be pragmatic, it would have been a lot of
work to adapt them to work with DI or HMVC
ZF2 : Still immature at that time
Then Symfony2 looked as an obvious and reasonnable choice. Furthermore
it’s heavily used, has a very active and nice community, and easy to learn.
Let’s do it !
Backwards Compatibility

                                   *Knock knock*

                                 devs: «Who's there ?»
                                «Product Management»
                          devs: «Product Management who ?»
                           «PM who wants to talk about BC»
                                   devs: «Oh crap...»




vendredi 30 novembre 12

Then the trouble began. We could have picked any other choice, the same
problem would have come anyway.
BC: The challenge



     • 100% data compatible (same database schema)

     • Include legacy templates in new ones

     • Routing fallback

     • Load legacy content templates with legacy rules

     • Settings

     • Access Symfony services from legacy modules


vendredi 30 novembre 12

Data compatible : The most important. One can easily switch from a legacy
eZ Publish 4.x instance to 5.0
BC: The challenge




vendredi 30 novembre 12
BC: The challenge




                              PM SCRUM Story:

                   «As an eZ Publish user, I don’t want to be
                     pissed off by a new #@!$% version!»




vendredi 30 novembre 12

eZ Publish 3 use case (2003). Major change => eZ Publish lost the 2/3rd of
its users, community members... Because there was no BC at all.
BC: The challenge




                          Challenge accepted




vendredi 30 novembre 12

Obviously we didn’t have choice...
It was basically trying to make a square fit inside a smaller triangle.
2 completely different systems, with 2 completely different approaches.

We got inspired of what guys from the Symfony community made when
Symfony 2 came out, to make their Symfony 1 application work with it.
BC: The challenge




                          Sandbox Legacy code

                            ...in a Closure !




vendredi 30 novembre 12

Code speaks like a thousand words
BC: The challenge




vendredi 30 novembre 12

So yes of course, we needed to refactor a lot the old kernel (esp. the old
front index.php and reduce it from 1.000+ lines to a dozen.
Using runCallback, legacy code is completely isolated. We can keep high
cohesion and loose coupling. Of course it adds some overhead, but it’s fairly
minimal from what it represents.

This is the central feature on top of which we built all the requirements
asked. And guess what ? It works !
BC: The Architecture




vendredi 30 novembre 12
BC: Icing on the cake




               eZ Publish legacy still works independently !


vendredi 30 novembre 12
From Symfony components to Full Stack




vendredi 30 novembre 12

When we started to do some prototyping, we needed to dive deep into the
Symfony components, to understand how they work together. We also
needed to be sure that they were loosely coupled.
So we started to use only some of them + Twig
From Symfony components to full stack



     • HttpFoundation

     • HttpKernel

     • Routing

     • Dependency Injection

     • Bundles

     • Templating + Twig

     • Composer




vendredi 30 novembre 12

The more we moved forward, the more our prototype looked like Symfony
standard edition.
Of course we started our own glue to tie these components together, in our
own bundles. But we found out that we were doing exactly the same than in
base Symfony bundles (but not that good, because not that generic).
From Symfony components to full stack




vendredi 30 novembre 12

So yes, we had our wheel.
But compared to what we could have...

So why don’t we simply use and extend main Symfony bundles ? Because it’s
«not invented here» ? Let’s be serious.
So we took the decision to go for Symfony full stack.
Another decision we made was not to put everything in bundles, to be as
decoupled as possible, at least from the full stack framework, to keep our
independency. We actually realized that this concept already existed even in
the full stack framework as libs are integrated a 2 levels : bridges
(component level), and bundles.
From Symfony components to full stack




vendredi 30 novembre 12

So yes, we had our wheel.
But compared to what we could have...

So why don’t we simply use and extend main Symfony bundles ? Because it’s
«not invented here» ? Let’s be serious.
So we took the decision to go for Symfony full stack.
Another decision we made was not to put everything in bundles, to be as
decoupled as possible, at least from the full stack framework, to keep our
independency. We actually realized that this concept already existed even in
the full stack framework as libs are integrated a 2 levels : bridges
(component level), and bundles.
Cross communities

                          We all have something to share




vendredi 30 novembre 12

I can hear some of you saying «Hey, you just copied what Drupal guys did!»
or «But what about Symfony CMF ?»
We obviously share the same goal : Make our PHP applications the best
possible. Why couldn’t we share the same tools ?
Drupal/eZ Publish : Of course we are in competition for many projects. But
it’s a sane competition now, because we have something in common, so we
need to collaborate. And we already did ! Helping each other on IRC,
discussing on Symfony CMF pull requests... It creates an emulation, and now
we can really focus on features that make the difference between the
different systems available.
Now we’re part of the Symfony family

                                      But not only...




vendredi 30 novembre 12

And we thus already started to contribute (through Symfony CMF, some PR
on Symfony main repository)

Not limited to the Symfony family. Don’t forget that eZ Publish’s core
business logic resides in its API, which can be virtually ported to any
framework. Why not imagine a port to work with ZF2 for instance ?
Fin

                                      Twitter : @jvieilledent
                                       https://joind.in/7563
                                  http://github.com/lolautruche
                          http://share.ez.no/community/profile/11256
                                                                       21

vendredi 30 novembre 12

Más contenido relacionado

La actualidad más candente

Conquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JSConquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JS
Caridy Patino
 
Symfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating productsSymfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating products
Xavier Lacot
 

La actualidad más candente (10)

Plone for python programmers
Plone for python programmersPlone for python programmers
Plone for python programmers
 
5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5
 
Conquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JSConquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JS
 
Plone pwns
Plone pwnsPlone pwns
Plone pwns
 
The Type We Want
The Type We WantThe Type We Want
The Type We Want
 
The Type We Want (MIX10)
The Type We Want (MIX10)The Type We Want (MIX10)
The Type We Want (MIX10)
 
Symfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating productsSymfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating products
 
Intravert atx meetup_condensed
Intravert atx meetup_condensedIntravert atx meetup_condensed
Intravert atx meetup_condensed
 
Comment créer, optimiser et monétiser vos contenus ?
Comment créer, optimiser et monétiser vos contenus ?Comment créer, optimiser et monétiser vos contenus ?
Comment créer, optimiser et monétiser vos contenus ?
 
Tomboy Web Sync Explained
Tomboy Web Sync ExplainedTomboy Web Sync Explained
Tomboy Web Sync Explained
 

Destacado

Industrializing eZ publish project development
Industrializing eZ publish project developmentIndustrializing eZ publish project development
Industrializing eZ publish project development
Jérôme Vieilledent
 

Destacado (6)

eZ Publish 5 in depth inspection
eZ Publish 5 in depth inspectioneZ Publish 5 in depth inspection
eZ Publish 5 in depth inspection
 
Industrializing eZ publish project development
Industrializing eZ publish project developmentIndustrializing eZ publish project development
Industrializing eZ publish project development
 
Introduction to CQRS and Event Sourcing
Introduction to CQRS and Event SourcingIntroduction to CQRS and Event Sourcing
Introduction to CQRS and Event Sourcing
 
PHP 7 new engine
PHP 7 new enginePHP 7 new engine
PHP 7 new engine
 
Creating hypermedia APIs in a few minutes using the API Platform framework
Creating hypermedia APIs in a few minutes using the API Platform frameworkCreating hypermedia APIs in a few minutes using the API Platform framework
Creating hypermedia APIs in a few minutes using the API Platform framework
 
Utiliser Webpack dans une application Symfony
Utiliser Webpack dans une application SymfonyUtiliser Webpack dans une application Symfony
Utiliser Webpack dans une application Symfony
 

Similar a Symfony and eZ Publish

The Network The Next Frontier for Devops ?
The Network   The Next Frontier for Devops ?The Network   The Next Frontier for Devops ?
The Network The Next Frontier for Devops ?
John Willis
 
Cloudstack collaboration conference Europe - SDN and Devops
Cloudstack collaboration conference Europe - SDN and DevopsCloudstack collaboration conference Europe - SDN and Devops
Cloudstack collaboration conference Europe - SDN and Devops
John Willis
 
Docker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in ProductionDocker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in Production
Docker, Inc.
 

Similar a Symfony and eZ Publish (20)

Why Open Cloud Platforms are important - OSCON 2013
Why Open Cloud Platforms are important - OSCON 2013Why Open Cloud Platforms are important - OSCON 2013
Why Open Cloud Platforms are important - OSCON 2013
 
The Network The Next Frontier for Devops ?
The Network   The Next Frontier for Devops ?The Network   The Next Frontier for Devops ?
The Network The Next Frontier for Devops ?
 
Cloudstack collaboration conference Europe - SDN and Devops
Cloudstack collaboration conference Europe - SDN and DevopsCloudstack collaboration conference Europe - SDN and Devops
Cloudstack collaboration conference Europe - SDN and Devops
 
Open frameworks 101_fitc
Open frameworks 101_fitcOpen frameworks 101_fitc
Open frameworks 101_fitc
 
Cloud East 2013 - Open Source Clouds
Cloud East 2013 - Open Source CloudsCloud East 2013 - Open Source Clouds
Cloud East 2013 - Open Source Clouds
 
Introduction to new technologies in drupal 8
Introduction to new technologies in drupal 8Introduction to new technologies in drupal 8
Introduction to new technologies in drupal 8
 
Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)
Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)
Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)
 
Multi-platform indie game development
Multi-platform indie game developmentMulti-platform indie game development
Multi-platform indie game development
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1
 
Docker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in ProductionDocker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in Production
 
Hacking OOo 2.0
Hacking OOo 2.0Hacking OOo 2.0
Hacking OOo 2.0
 
RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)
 
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
 
2011 02-14-libre
2011 02-14-libre2011 02-14-libre
2011 02-14-libre
 
Squeak
SqueakSqueak
Squeak
 
DevOps for Scala 2.0
DevOps for Scala 2.0DevOps for Scala 2.0
DevOps for Scala 2.0
 
Intro to openFrameworks
Intro to openFrameworksIntro to openFrameworks
Intro to openFrameworks
 
Puppet 3: Present and Future Tense
Puppet 3: Present and Future TensePuppet 3: Present and Future Tense
Puppet 3: Present and Future Tense
 
Puppet 3: Present and Future Tense
Puppet 3: Present and Future TensePuppet 3: Present and Future Tense
Puppet 3: Present and Future Tense
 
Thumbcoil: How we got here...
Thumbcoil: How we got here...Thumbcoil: How we got here...
Thumbcoil: How we got here...
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

Symfony and eZ Publish

  • 1. Symfony'and'eZ'Publish Let’s&have&a&trip&together Jérôme Vieilledent - Software engineer / http://ez.no / http://share.ez.no vendredi 30 novembre 12
  • 2. Genesis of the Symfony aspects vendredi 30 novembre 12 eZ Publish 4 released in 2007. More a PHP5 adaptation than a real rewrite. We added features during these years of course, but the main base code kept unchanged. Several attempts were initiated for a complete rewrite (back in 2008 with eZ Components) but the real project began in mid-2010 with a complete re- thinking of our core business API.
  • 3. Requirements • Easily integrate our API • HMVC (Hierarchical Model View Controller) stack • Decoupled components • Dependency injection • New template engine • Extensible, Open, Reliable ;-) vendredi 30 novembre 12 API : Working on it for more than a year at that time. Complete rewrite of what makes our core business logic. It’s using DI, but without any container or any dependency from out there. Completely independent HMVC : In our old model we kind of used MVC, but flawed by too much logic in the view (fetch functions). We needed something that fixes both our needs (trigger some logic from the view) and the MVC model Decoupled + DI : Keep our independency (API is purely independent lib) Templates : Our template engine was way too old, with edge case bugs, very hard to maintain. Plus we wanted flexibility, like being able to easily switch from one engine to another.
  • 4. Get rid of the (old) monolith vendredi 30 novembre 12 And of course our approach was monolithic (legacy PHP 4 ages, weak OO model). Lots of extension points, but interdependent, impossible to decouple, impossible to test properly (singletons everywhere)
  • 5. Get rid of the (old) monolith vendredi 30 novembre 12 And of course our approach was monolithic (legacy PHP 4 ages, weak OO model). Lots of extension points, but interdependent, impossible to decouple, impossible to test properly (singletons everywhere)
  • 6. Useful things start in a bar vendredi 30 novembre 12 Lisbon conference, almost all eZ engineering, in an informal beer meeting (probably the best way to make meetings ever). Community guys were here too. We became to chat about what would be eZ Publish 5 (after some more beers, so that we were too drunk to fight). Sharing one’s experiences with Twig, Symfony2, Zeta... We started to imagine how would the paper gift around eZ Publish API would be
  • 7. Options • Home made • Zeta Components • Zend Framework 2 • Symfony 2 vendredi 30 novembre 12 Home made : Why would we do that ? Too much work for what ? Doing the same mistakes than in the past, just because otherwise it would be «not invented here» ? No Zeta Components : eZ has a long story with them. Back in 2008-2009, their destiny was to become the next generation of eZ Publish. For several reasons it didn’t happen. And to be pragmatic, it would have been a lot of work to adapt them to work with DI or HMVC ZF2 : Still immature at that time Then Symfony2 looked as an obvious and reasonnable choice. Furthermore it’s heavily used, has a very active and nice community, and easy to learn. Let’s do it !
  • 8. Backwards Compatibility *Knock knock* devs: «Who's there ?» «Product Management» devs: «Product Management who ?» «PM who wants to talk about BC» devs: «Oh crap...» vendredi 30 novembre 12 Then the trouble began. We could have picked any other choice, the same problem would have come anyway.
  • 9. BC: The challenge • 100% data compatible (same database schema) • Include legacy templates in new ones • Routing fallback • Load legacy content templates with legacy rules • Settings • Access Symfony services from legacy modules vendredi 30 novembre 12 Data compatible : The most important. One can easily switch from a legacy eZ Publish 4.x instance to 5.0
  • 10. BC: The challenge vendredi 30 novembre 12
  • 11. BC: The challenge PM SCRUM Story: «As an eZ Publish user, I don’t want to be pissed off by a new #@!$% version!» vendredi 30 novembre 12 eZ Publish 3 use case (2003). Major change => eZ Publish lost the 2/3rd of its users, community members... Because there was no BC at all.
  • 12. BC: The challenge Challenge accepted vendredi 30 novembre 12 Obviously we didn’t have choice... It was basically trying to make a square fit inside a smaller triangle. 2 completely different systems, with 2 completely different approaches. We got inspired of what guys from the Symfony community made when Symfony 2 came out, to make their Symfony 1 application work with it.
  • 13. BC: The challenge Sandbox Legacy code ...in a Closure ! vendredi 30 novembre 12 Code speaks like a thousand words
  • 14. BC: The challenge vendredi 30 novembre 12 So yes of course, we needed to refactor a lot the old kernel (esp. the old front index.php and reduce it from 1.000+ lines to a dozen. Using runCallback, legacy code is completely isolated. We can keep high cohesion and loose coupling. Of course it adds some overhead, but it’s fairly minimal from what it represents. This is the central feature on top of which we built all the requirements asked. And guess what ? It works !
  • 16. BC: Icing on the cake eZ Publish legacy still works independently ! vendredi 30 novembre 12
  • 17. From Symfony components to Full Stack vendredi 30 novembre 12 When we started to do some prototyping, we needed to dive deep into the Symfony components, to understand how they work together. We also needed to be sure that they were loosely coupled. So we started to use only some of them + Twig
  • 18. From Symfony components to full stack • HttpFoundation • HttpKernel • Routing • Dependency Injection • Bundles • Templating + Twig • Composer vendredi 30 novembre 12 The more we moved forward, the more our prototype looked like Symfony standard edition. Of course we started our own glue to tie these components together, in our own bundles. But we found out that we were doing exactly the same than in base Symfony bundles (but not that good, because not that generic).
  • 19. From Symfony components to full stack vendredi 30 novembre 12 So yes, we had our wheel. But compared to what we could have... So why don’t we simply use and extend main Symfony bundles ? Because it’s «not invented here» ? Let’s be serious. So we took the decision to go for Symfony full stack. Another decision we made was not to put everything in bundles, to be as decoupled as possible, at least from the full stack framework, to keep our independency. We actually realized that this concept already existed even in the full stack framework as libs are integrated a 2 levels : bridges (component level), and bundles.
  • 20. From Symfony components to full stack vendredi 30 novembre 12 So yes, we had our wheel. But compared to what we could have... So why don’t we simply use and extend main Symfony bundles ? Because it’s «not invented here» ? Let’s be serious. So we took the decision to go for Symfony full stack. Another decision we made was not to put everything in bundles, to be as decoupled as possible, at least from the full stack framework, to keep our independency. We actually realized that this concept already existed even in the full stack framework as libs are integrated a 2 levels : bridges (component level), and bundles.
  • 21. Cross communities We all have something to share vendredi 30 novembre 12 I can hear some of you saying «Hey, you just copied what Drupal guys did!» or «But what about Symfony CMF ?» We obviously share the same goal : Make our PHP applications the best possible. Why couldn’t we share the same tools ? Drupal/eZ Publish : Of course we are in competition for many projects. But it’s a sane competition now, because we have something in common, so we need to collaborate. And we already did ! Helping each other on IRC, discussing on Symfony CMF pull requests... It creates an emulation, and now we can really focus on features that make the difference between the different systems available.
  • 22. Now we’re part of the Symfony family But not only... vendredi 30 novembre 12 And we thus already started to contribute (through Symfony CMF, some PR on Symfony main repository) Not limited to the Symfony family. Don’t forget that eZ Publish’s core business logic resides in its API, which can be virtually ported to any framework. Why not imagine a port to work with ZF2 for instance ?
  • 23. Fin Twitter : @jvieilledent https://joind.in/7563 http://github.com/lolautruche http://share.ez.no/community/profile/11256 21 vendredi 30 novembre 12