eZ Publish 5 in depth inspection
-
Upload
jerome-vieilledent -
Category
Technology
-
view
1.427 -
download
1
description
Transcript of eZ Publish 5 in depth inspection
![Page 1: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/1.jpg)
eZ#Publish#5#in-depth#inspec2on#Insights(from(eZ(Engineers
![Page 2: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/2.jpg)
Overview
1. Glossary2. Structure
1. Git2. Directories, where is the stuff ?
3. eZ Publish Symfony integration1. New template engine2. eZ Publish 5 Symfony code3. Legacy fallback
4. Public API (“PAPI”)5. REST
1. Spec2. Demo!
![Page 3: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/3.jpg)
! 10/18/12! Presenter: eZ Engineering
Glossary: 4.x -> 5.x
3
(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
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
![Page 4: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/4.jpg)
! 10/18/12! Presenter: eZ Engineering
Glossary: 4.x -> 5.x
4
Module Controller
Module view Controller action (method)
Fetch Sub request (render)
Template operator filter + function
Template function tag
Extension Bundle
ObjectState ObjectState
- Template operators, all basic operations are covered by twig example later
![Page 5: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/5.jpg)
eZ Publish 5 Structure
![Page 6: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/6.jpg)
! 10/18/12! Presenter: eZ Engineering 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
The meta is purely to pull in all dependencies to create a full eZ Publish 5 installation using composerNext slide will drill down eZ Publish 5.x meta repository
![Page 7: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/7.jpg)
! 10/18/12! Presenter: eZ Engineering
eZ Publish 5 Structure: ezsystems/ezpublish5
app ezpublish_legacy
src <your custom bundles>
vendor ezsystems− ezpublish
symfony twig zetacomponents
web7
app is project config, cache and logsCurrently contains eZ Publish 4.x, and your custom config
src is project code filesCurrently 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
![Page 8: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/8.jpg)
eZ Publish 5 Symfony integration
![Page 9: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/9.jpg)
! 10/18/12! Presenter: eZ Engineering
eZ Publish 5 Symfony Integration: Templates
9
From:
![Page 10: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/10.jpg)
! 10/18/12! Presenter: eZ Engineering
eZ Publish 5 Symfony Integration: Templates
10
To:
![Page 11: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/11.jpg)
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.
![Page 12: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/12.jpg)
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
![Page 13: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/13.jpg)
BC: The challenge
![Page 14: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/14.jpg)
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.
![Page 15: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/15.jpg)
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.
![Page 16: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/16.jpg)
BC: The challenge
Sandbox Legacy code
...in a \Closure !
Code speaks like a thousand words
![Page 17: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/17.jpg)
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 !
![Page 18: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/18.jpg)
BC: Icing on the cake
eZ Publish legacy still works independently !
![Page 19: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/19.jpg)
eZ Publish 5 Public API
![Page 20: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/20.jpg)
! 10/18/12! Presenter: eZ Engineering
eZ Publish 5 Public API: Structure
20
doceZ
Publish− API
− Core
− SPI
settingsvendor
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
![Page 21: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/21.jpg)
! 10/18/12! Presenter: eZ Engineering
eZ Publish 5 Public API: Use in DemoBundle
21
![Page 22: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/22.jpg)
eZ Publish 5 REST API
![Page 23: eZ Publish 5 in depth inspection](https://reader033.fdocuments.in/reader033/viewer/2022052901/55700b85d8b42ac0178b492b/html5/thumbnails/23.jpg)
2424
Fin
Twitter : @jvieilledent, @dpobel, @andrerom, @patrick_allaert, @bdunogier
https://joind.in/7525