Post on 28-Jul-2015
Where Content Means Business
Symfony PHP NYC meetup
Why we ditched our legacy framework for Symfony - a journey to Symfony2 (full stack)
Roland Benedetti - Product @ezsystems
An Open Source PHP CMS Pioneer
2
• Coming from Norway and Europe, but now designed in Brooklyn
• Creators of eZ Publish platform, an Open Source CMS pioneer, still alive and kicking!
• 40k+ members in the community
• More than 5M downloads (stopped counting…)
• 2.55M lines of code :-(
• Commercial Open Source (GPL) CMS offering for Enterprise
• but also fathers of eZ Components, who turned into Apache Zeta Components
Back in spring 2011
3
In 2011, eZ Publish 4.x codebase has 8 years, is rock solid, went through PHP4 and PHP5,
very well accepted but shows some limitations. Our challenge back then:
• To redevelop the core business logic - the content repository and its APIs to allow future
scalability and cloud infrastructure needs.
• To adopt a real layered architecture and rely on a framework technology used by many and
not just us - moving from in-house fwk to a one shared with a wider community.
Our options
4
• Our own eZ Components / Zeta components libraries
• Zend (slightly loosing traction, and quite heavy)
• Symfony 2 (gaining traction)
• Moving to another platform (Java / Spring)
And we went for…
5
What made us tick:
• Native HTTP approach for cache, promising nice perspectives on use of ESI (Edge Side
Include) and ability to implement very smart caching.
• The very vibrant and growing community (especially in Europe and France)
Our major concern:
• The performance of Symfony without Cache.
Retrospectively
6
A very good move, 1st for non-technical reasons:
• Shifting focus to our core activity: the content management, not the app. fwk
• Cross pollination between communities (the Symfony community but also other
communities using Symfony, like Sylius, Oro, Drupal…)
• Fostering contributions in our ecosystem
• Making it easier to customize
Retrospectively
7
Technically, also a very good move very well adopted in the community.
Top 5 of the perks asking developers:
#1 Composer
8
A top-notch dependency mgmt tool, PHP is much better than you think :-)
Reinvent the way we deploy PHP apps (and eZ Publish)
#2 Twig
9
Bye bye home-brewed TPL engine, we loved your fetch-functions but
now we can really clearly separate view from business logic!
#4 Packaging your own App
11
One single app. to rule them all
Example:
Sylius (http://sylius.org/) + eZ
= full Content+Commerce solution (forget connectors)
#5 The cache approach, and fit with Varnish
12
We loved the initial cache approach, but we even more love how we
were able to extend it to be context aware and smart
https://doc.ez.no/display/EZP/Context+aware+HTTP+cache
https://github.com/FriendsOfSymfony/FOSHttpCacheBundle
A progressive move with as little BC breaks
16
5.25.1 5.35.0 5.4
legacy
New
Stack
legacy
eZ Publish eZ Publish Platform eZ Platform
Targeted architecture
17Storage
eZ Pla,orm Business Logic
Persistence & IO SPI
Public API
Symfony2 Web Framework
REST API
Twig Template Engine
Website / Demo siteCMS User
Interface
End Users (Website users)
Editor, Marketer, Admin (CMS users)
Web ServiceUser Interface
APIs
Web Framework & dev
Kernel(s)
Content & Data
Current architecture (5.x)
…
18Storage
legacy kernel:eZ Publish Legacy Business Locic (LS) eZ Pla,orm kernel:
eZ Pla,orm Business Logic
Persistence & IO SPI
Public API
Symfony2 Full Stack
REST API
Twig Template EngineeZ & custom controllers
eZ Template Engine (LS)
Legacy modules
Website / Demo siteCMS UI (LS)
End Users (Website users)
Editor, Marketer, Admin (CMS users)
Web Service IntegraRon
User Interface
APIs
Web Framework & dev
Kernel(s)
Content & Data
New kernel & legacy kernel Interoperability
New architecture (eZ Platform)
Storage
eZ Pla,orm Business Logic
Persistence & IO SPI
Public API
Symfony2 Web Framework
REST APITwig Template Engine
Website / Demo site
eZ Pla,orm U.I.
End Users (Website users)
Editor, Marketer, Admin (CMS users)
Web ServiceUser Interface
APIs
Web Framework & dev
Kernel(s)
Content & Data
eZ Studio
legacy kernel
(opRonal non supported bundle)
old UI
New architecture (eZ Platform)
Rich Internet ApplicaRon • javaScript Based • relying heavily on eZ REST API • YUI as a basis for the JS framework
Storage System
Web Browser
JS ApplicaRon
Web Server
eZ Pla,orm Kernel
PAPI
eZ JS
REST Client
REST API Business
LogicApplicaRon Logic
JS Framework (YUI)
Content Repository
PresentaRon Logic
Wanna check it out?
http://doc.ez.no http://share.ez.no http://www.sitepoint.com/getting-started-ez-platform-vagrant/
22
Where Content Means Business
Thanks! Symfony rocks!
roland.benedetti@ez.no - @rolandbenedetti