2. Overview
1. Glossary
2. Structure
1. Git
2. Directories, where is the stuff ?
3. eZ Publish Symfony integration
1. New template engine
2. eZ Publish 5 Symfony code
3. Legacy fallback
4. Public API (“PAPI”)
5. REST
1. Spec
2. Demo!
3. Glossary: 4.x -> 5.x
(Content) object Content
(Content) class Content Type
(Content) attribute Field
(Content) class attribute Field Definition
Data type Field Type
Node Location
(Content) class group Content Type Group
! Presenter: eZ Engineering ! 10/18/12 3
As one of the first things we defined slightly new names for existing concepts in eZ Publish to move closer to what end users, and
what other systems out there where using
Mainly to make sure we can introduce less technical terms at high level as well as low level to make sure everyone eventually
speaks the same simplified domain language
Also this was done to lower the barrier of entry for new users and developers
4. Glossary: 4.x -> 5.x
Module Controller
Module view Controller action (method)
Fetch Sub request (render)
Template operator filter + function
Template function tag
Extension Bundle
ObjectState ObjectState
! Presenter: eZ Engineering ! 10/18/12 4
- Template operators, all basic operations are covered by twig example later
6. eZ Publish 5 Structure: GIT organization ATM
eZ Publish 5.x meta repository which uses composer to get
everything else:
− https://github.com/ezsystems/ezpublish5
− eZ Publish 5.x API:
https://github.com/ezsystems/ezp-next
− eZ Publish 4.x “LS” repository:
https://github.com/ezsystems/ezpublish
! Presenter: eZ Engineering ! 10/18/12 6
The meta is purely to pull in all dependencies to create a full eZ Publish 5 installation using composer
Next slide will drill down eZ Publish 5.x meta repository
7. eZ Publish 5 Structure: ezsystems/ezpublish5
app
ezpublish_legacy
src
<your custom bundles>
vendor
ezsystems
− ezpublish
symfony
twig
zetacomponents
web
! Presenter: eZ Engineering ! 10/18/12 7
app is project config, cache and logs
Currently contains eZ Publish 4.x, and your custom config
src is project code files
Currently contains eZ Demo Design bundle, but this will be moved out
vendor is a folder created by composer when executed as mentioned in Readme.md, will contain all
project dependencies
ezsystems/ezpublish is what was referred to as ezp-next on previous slide
web is folder for everything that should be reachable from the web, aka public folder
9. eZ Publish 5 Symfony Integration: Templates
From:
! Presenter: eZ Engineering ! 10/18/12 9
10. eZ Publish 5 Symfony Integration: Templates
To:
! Presenter: eZ Engineering ! 10/18/12 10
11. Backwards Compatibility
*Knock knock*
devs: «Who's there ?»«PM»devs: «PM who ?»«PM who wants
to talk about BC»devs: «Oh crap...»
Then the trouble began. We could have picked any other choice, the same
problem would have come anyway.
12. 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
Data compatible : The most important. One can easily switch from a legacy
eZ Publish instance to 5.0
14. BC: The challenge
PM SCRUM Story:
«As an eZ Publish user, I don’t want to be
pissed off by a new #@!$% version!»
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.
15. BC: The challenge
Challenge accepted
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.
16. BC: The challenge
Sandbox Legacy code
...in a Closure !
Code speaks like a thousand
words
17. BC: The challenge
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 !
18. BC: Icing on the cake
eZ Publish legacy still works independently !
20. eZ Publish 5 Public API: Structure
doc
eZ
Publish
− API
− Core
− SPI
settings
vendor
! Presenter: eZ Engineering ! 10/18/12 20
settings is something you can create to override public API settings at the moment, this is done by
creating file settings/override/service.ini
vendor is a folder created by composer when executed as mentioned in Readme.md
API is what you will use when coding against eZ Publish 5
Core is the implementation of xPI interfaces bundled with the “kernel”, this is only interesting if you
want to see how implementation is done, in day to day API use you only need to know API
SPI are the interfaces you can use when you want to extend eZ Publish, the handlers to use 4.x
terms
Next slide will drill down into the [Public] API
21. eZ Publish 5 Public API: Use in DemoBundle
! Presenter: eZ Engineering ! 10/18/12 21