SlideShare a Scribd company logo
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

More Related Content

What's hot

Plone for python programmers
Plone for python programmersPlone for python programmers
Plone for python programmers
Dylan Jay
 
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
Dylan Jay
 
Conquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JSConquistando el Servidor con Node.JS
Conquistando el Servidor con Node.JSCaridy Patino
 
Plone pwns
Plone pwnsPlone pwns
Plone pwns
Dylan Jay
 
The Type We Want
The Type We WantThe Type We Want
The Type We Want
Jonathan Snook
 
The Type We Want (MIX10)
The Type We Want (MIX10)The Type We Want (MIX10)
The Type We Want (MIX10)
Jonathan Snook
 
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 productsXavier Lacot
 
Intravert atx meetup_condensed
Intravert atx meetup_condensedIntravert atx meetup_condensed
Intravert atx meetup_condensed
zznate
 
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 ?
Kaliop-slide
 
Tomboy Web Sync Explained
Tomboy Web Sync ExplainedTomboy Web Sync Explained
Tomboy Web Sync Explained
Mohan Krishnan
 

What's hot (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
 

Viewers also liked

eZ Publish 5 in depth inspection
eZ Publish 5 in depth inspectioneZ Publish 5 in depth inspection
eZ Publish 5 in depth inspection
Jérôme Vieilledent
 
Industrializing eZ publish project development
Industrializing eZ publish project developmentIndustrializing eZ publish project development
Industrializing eZ publish project developmentJérôme Vieilledent
 
Introduction to CQRS and Event Sourcing
Introduction to CQRS and Event SourcingIntroduction to CQRS and Event Sourcing
Introduction to CQRS and Event Sourcing
Samuel ROZE
 
PHP 7 new engine
PHP 7 new enginePHP 7 new engine
PHP 7 new engine
julien pauli
 
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
Les-Tilleuls.coop
 
Utiliser Webpack dans une application Symfony
Utiliser Webpack dans une application SymfonyUtiliser Webpack dans une application Symfony
Utiliser Webpack dans une application Symfony
Alain Hippolyte
 

Viewers also liked (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 to Symfony and eZ Publish

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
Andy Piper
 
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
 
Open frameworks 101_fitc
Open frameworks 101_fitcOpen frameworks 101_fitc
Open frameworks 101_fitc
benDesigning
 
Cloud East 2013 - Open Source Clouds
Cloud East 2013 - Open Source CloudsCloud East 2013 - Open Source Clouds
Cloud East 2013 - Open Source Clouds
Andy Piper
 
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
naxoc
 
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)
Toshiharu Harada, Ph.D
 
Multi-platform indie game development
Multi-platform indie game developmentMulti-platform indie game development
Multi-platform indie game development
Davide Coppola
 
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
benDesigning
 
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 ProductionDocker, Inc.
 
Hacking OOo 2.0
Hacking OOo 2.0Hacking OOo 2.0
Hacking OOo 2.0
Alexandro Colorado
 
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.)
alloy020
 
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
Pilot
 
Squeak
SqueakSqueak
DevOps for Scala 2.0
DevOps for Scala 2.0DevOps for Scala 2.0
DevOps for Scala 2.0
Michele Sciabarrà
 
Intro to openFrameworks
Intro to openFrameworksIntro to openFrameworks
Intro to openFrameworks
Kyle McDonald
 
Puppet 3: Present and Future Tense
Puppet 3: Present and Future TensePuppet 3: Present and Future Tense
Puppet 3: Present and Future Tense
Puppet
 
Puppet 3: Present and Future Tense
Puppet 3: Present and Future TensePuppet 3: Present and Future Tense
Puppet 3: Present and Future Tense
Eric Sorenson
 
Thumbcoil: How we got here...
Thumbcoil: How we got here...Thumbcoil: How we got here...
Thumbcoil: How we got here...
Jon-Carlos Rivera
 

Similar to 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...
 

Recently uploaded

Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 

Recently uploaded (20)

Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 

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