Demystifying eZ Publish 5.x for eZ Publish 4.0 developers

Post on 05-Dec-2014

991 views 1 download

description

How and why to migrate eZ Publish 4 to eZ publish 5 : Limitations, benefits and complexity. How eZ publish 5 may revolutionize the way you build websites with the new symfony2 stack

Transcript of Demystifying eZ Publish 5.x for eZ Publish 4.0 developers

1401 Avenue du Mondial 98 Immeuble Oxygène

34000 Montpellier04 99 13 68 60

1 KALIOP.COM

Demystifying eZPublish 5.xfor eZPublish 4.x developers

Le 15/05/2014

Major changes in a nutshell for developers

2

Replace your template fetch with PHP (HMVC)

Replace your viewcache / cacheblocks withHTTP Cache / ESI (Varnish)

Replace your old eztemplate code withTWIG / Assetics

New public API & Symfony full-stack for dev(dependency injection, bundles...)

Replace your read-only REST API withA eZ custom RESTful API V2

Replace your old INI files with YAML

New ezdemobundle to bootstrap a project or learn

Le 15/05/2014

Major changes in a nutshell for editors ?

3

Same back office with new... (old) designrun with full ezpublish_legacy stack

Le 15/05/2014

ezdemobundle ?

4

1401 Avenue du Mondial 98 Immeuble Oxygène

34000 Montpellier04 99 13 68 60

5 KALIOP.COM

Demystifying eZPublish 5.xPlatform Architecture

Le 15/05/2014

Platform Architecture

6

https://confluence.ez.no/pages/viewpage.action?pageId=11403666#eZPublish5Architecture-Introduction&Overview-Whatarethechanges?

Le 15/05/2014

Full legacy mode (eZP 4.8+... BO)

7

https://confluence.ez.no/pages/viewpage.action?pageId=11403666#eZPublish5Architecture-Introduction&Overview-Whatarethechanges?

Le 15/05/2014

eZPublish 5 through legacy (default)

8

https://confluence.ez.no/pages/viewpage.action?pageId=11403666#eZPublish5Architecture-Introduction&Overview-Whatarethechanges?

Le 15/05/2014

eZPublish 5 full symfony (exp.)

9

https://confluence.ez.no/pages/viewpage.action?pageId=11403666#eZPublish5Architecture-Introduction&Overview-Whatarethechanges?

1401 Avenue du Mondial 98 Immeuble Oxygène

34000 Montpellier04 99 13 68 60

10

KALIOP.COM

Demystifying eZPublish 5.xCode basics

Le 15/05/2014

Folders

11

Behat / phpUnit testingCache / global configs / logs

Your bundle (controllers / templates / configs, tests, services...)

Exposed to vhost (index.php, symlinks to assets)

3rd part libs & eZ5 new kernel

Stand-alone eZ legacy

Le 15/05/2014

Folders

12

Your controllers (contain queries)

Your templates

Your global settings

settings / templates overrides

Le 15/05/2014

SiteAccess / mode setup

13

Import settings

Same eZ4 HostMap logical + additionnal rules

Root node / index_page

Set legacy mode for admin

https://confluence.ez.no/display/EZP/How+to+paginate+API+search+results

Simple (fetch) exemple

Query your content whith parameters

Inject the result within the pager class

Render with twig

https://confluence.ez.no/display/EZP/How+to+paginate+API+search+results

Twig exemples

Simple template exemple

Fallback exemple with eZFind

https://confluence.ez.no/display/EZP/Legacy+code+and+features

https://confluence.ez.no/display/EZP/View+provider+configuration

Template override

https://confluence.ez.no/display/EZP/View+provider+configuration

Template override

1401 Avenue du Mondial 98 Immeuble Oxygène

34000 Montpellier04 99 13 68 60

19

KALIOP.COM

Demystifying eZPublish 5.xFeature comparison

Feature comparison : white list

Full list : https://confluence.ez.no/display/EZP/4.x+feature+comparison

Feature comparison : white list

Full list : https://confluence.ez.no/display/EZP/4.x+feature+comparison

Feature comparison : grey list

Full list : https://confluence.ez.no/display/EZP/4.x+feature+comparison

Now available : https://github.com/netgen/TagsBundle

Feature comparison with details

https://docs.google.com/spreadsheet/ccc?key=0AgGKn8SQ_akMdFQ3VU0wMlR3cENxTDZ2dkhUcVN2SWc#gid=0

1401 Avenue du Mondial 98 Immeuble Oxygène

34000 Montpellier04 99 13 68 60

24

KALIOP.COM

Demystifying eZPublish 5.xHTTP Cache

eZ Publish 5 cache in a nutshell

Twig compiled templatesRoutingservice containertranslations...

Persistence cache

User

GET /

200 OKAge : 100

Cache-control: Maxage=300

X-Location-Id:2

X-Location-Id:{nodeID}Vary: X-User-Hash

expired

eZ

PROD

DEV

HTTP Cache

Clear onViewcacheevent

Understand eZ Publish 5 cache in details

1401 Avenue du Mondial 98 Immeuble Oxygène

34000 Montpellier04 99 13 68 60

27

KALIOP.COM

Demystifying eZPublish 5.xHow to learn ?

How to learn ?

Developer documentation :https://confluence.ez.no/display/EZP/eZ+Publish+Documentation

Read the ezdemobundle code (learn with live code exemples !)Vendor/ezsystems/demoBundle/

Learn Symfony basics first !

1401 Avenue du Mondial 98 Immeuble Oxygène

34000 Montpellier04 99 13 68 60

29

KALIOP.COM

Demystifying eZPublish 5.xUpgrading opportunity ?

Upgrading effort ?

You can migrate your features & existing layers step-by-step (and keep a fallback for other features)

If we consider a full migration, you will need to :

- Replace all the templating with Twig+PHP controller

- Rebuild all the custom PHP dev (modules, scripts, datatypes, template operators, etc.) with new symfony+public API logical

- Redesign your cache logical with HTTP cache

- Add Varnish on top of your platform

If we consider a full migration, you don't have to :Think about the content & the back office

Upgrading oppotunity ?

Good if you need to redbuild the front-end for any reasons : (responsive, new design, need ESI massively, etc), opportuniy to rebuild with controllers+Twig

Good if you need a RESTful API for external App (mobile, middleware)

Good if you have many new custom development to do.Symfony will fit with the best practices (testing, injection dependency)

1401 Avenue du Mondial 98 Immeuble Oxygène

34000 Montpellier04 99 13 68 60

32

KALIOP.COM

Demystifying eZPublish 5.xQuestion ?

Des questions ?

1

1401 Avenue du Mondial 98Immeuble Oxygène34000 Montpellier

04 99 13 68 60

PROCHAIN WEBINAR :

Kaliop.fr

• Bien intégrer sa boutique e-Commerce à son système d'information•Le 17 juin à 16h00. S'inscrire

2

1401 Avenue du Mondial 98Immeuble Oxygène34000 Montpellier

04 99 13 68 60

GROUPE KALIOP

Kaliop.fr4

Kaliop.fr5

Le groupe

32

Kaliop.fr6

Le groupe

33