SlideShare a Scribd company logo
1 of 12
Download to read offline
It’s all about eXperience
EzobjectWrapper
Workshop
1. Why we needed a wrapper
2. What is ezobjectwrapper ?
3. Hands on exercises
4. Q&A
2
EzobjectWrapper
Workshop
Why we needed a
wrapper
01
● Performance issues when
displaying multiple contents in
the same page with ez_content:
viewLocation
● Rendering rules in classes rather
than repositories/controller
● Listing different content types
with the same HTML code
3
What is
EzobjectWrapper ?
02
● Bundle originally made by
Antonin Savoie, dev@Kaliop
● A wrapper encapsulates content
& location (lazy loading)
● Each wrapper provides its own
methods / business logic
● Factory creates corresponding
wrapper object depending on
content type
● Bonus : renderLocation twig
function
4
Github repos
Titre de la présentation à personnaliser 5
https://github.com/kaliop/ezobjectwrapper
https://github.com/kaliop/ezobjectwrapper-workshop
Encapsulates content & location
Titre de la présentation à personnaliser 6
public function __construct(ContainerInterface $container, $location = null, $content = null)
{
….
$this->location = $location;
$this->content = $content;
}
Lazy loading
Titre de la présentation à personnaliser 7
public function content()
{
if($this->content == null){
$this->content = $this->repository->getContentService()->loadContent($this->location->contentId);
}
return $this->content;
}
EzobjectWrapper factory
Titre de la présentation à personnaliser 8
public function buildeZObjectWrapper($source)
{
$locationSource = null;
$contentSource = null;
if(is_numeric($source)) {
$locationSource = $source = $this->repository->getLocationService()->loadLocation($source);
} elseif($source instanceof Content) {
$contentSource = $source;
} else {
$locationSource = $source;
}
$contentTypeIdentifier = $this->repository->getContentTypeService()->loadContentType($source->contentInfo->contentTypeId)->identifier;
$mappingEntities = $this->container->getParameter('class_mapping');
$defaultClass = $this->container->getParameter('default_ezobject_class');
if(isset($mappingEntities[$contentTypeIdentifier])){
$className = $mappingEntities[$contentTypeIdentifier];
} else {
$className = $defaultClass;
}
$objectWrapper = new $className($this->container, $locationSource, $contentSource);
return $objectWrapper;
}
renderLocation Twig function
Titre de la présentation à personnaliser 9
{{ render( controller( "ez_content:viewLocation", {"locationId": 123, "viewType": "line"} ) ) }}
Before :
{{ renderLocation( 123, "line" )|raw }}
After :
public function renderLocation($locationID, $viewType, $params = array()) {
$rendering = $this->container->get('ezpublish.controller.content.view')->viewLocation($locationID, $viewType, false, $params);
return htmlspecialchars_decode($rendering->getContent());
}
How it works :
Hands on exercises
03 10
Check your ezobjwrapper instance is working
Titre de la présentation à personnaliser 11
$ cd /var/www/summercamp/workshops/ezobjwrapper
$ git pull
$ git checkout step-0
Open http://ezobjwrapper.ezsc in your browser
Q&A
04 12

More Related Content

What's hot

Adding ES6 to Your Developer Toolbox
Adding ES6 to Your Developer ToolboxAdding ES6 to Your Developer Toolbox
Adding ES6 to Your Developer ToolboxJeff Strauss
 
Hands-on with the Symfony2 Framework
Hands-on with the Symfony2 FrameworkHands-on with the Symfony2 Framework
Hands-on with the Symfony2 FrameworkRyan Weaver
 
Development of Ansible modules
Development of Ansible modulesDevelopment of Ansible modules
Development of Ansible modulesjtyr
 
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with BehatGrand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with BehatRyan Weaver
 
Mojolicious, real-time web framework
Mojolicious, real-time web frameworkMojolicious, real-time web framework
Mojolicious, real-time web frameworktaggg
 
Plugin jQuery, Design Patterns
Plugin jQuery, Design PatternsPlugin jQuery, Design Patterns
Plugin jQuery, Design PatternsRobert Casanova
 
深入淺出 MVC
深入淺出 MVC深入淺出 MVC
深入淺出 MVCJace Ju
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHPBradley Holt
 
Building Content Types with Dexterity
Building Content Types with DexterityBuilding Content Types with Dexterity
Building Content Types with DexterityDavid Glick
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hopeMarcus Ramberg
 
jQuery Plugin Creation
jQuery Plugin CreationjQuery Plugin Creation
jQuery Plugin Creationbenalman
 
Twig: Friendly Curly Braces Invade Your Templates!
Twig: Friendly Curly Braces Invade Your Templates!Twig: Friendly Curly Braces Invade Your Templates!
Twig: Friendly Curly Braces Invade Your Templates!Ryan Weaver
 
Laying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme developmentLaying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme developmentTammy Hart
 
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014Matthias Noback
 
xml-motor ~ What,Why,How
xml-motor ~ What,Why,Howxml-motor ~ What,Why,How
xml-motor ~ What,Why,HowAbhishek Kumar
 
From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)Joseph Chiang
 

What's hot (20)

Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Adding ES6 to Your Developer Toolbox
Adding ES6 to Your Developer ToolboxAdding ES6 to Your Developer Toolbox
Adding ES6 to Your Developer Toolbox
 
Hands-on with the Symfony2 Framework
Hands-on with the Symfony2 FrameworkHands-on with the Symfony2 Framework
Hands-on with the Symfony2 Framework
 
Development of Ansible modules
Development of Ansible modulesDevelopment of Ansible modules
Development of Ansible modules
 
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with BehatGrand Rapids PHP Meetup: Behavioral Driven Development with Behat
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
 
Effective ES6
Effective ES6Effective ES6
Effective ES6
 
Mojolicious, real-time web framework
Mojolicious, real-time web frameworkMojolicious, real-time web framework
Mojolicious, real-time web framework
 
Plugin jQuery, Design Patterns
Plugin jQuery, Design PatternsPlugin jQuery, Design Patterns
Plugin jQuery, Design Patterns
 
深入淺出 MVC
深入淺出 MVC深入淺出 MVC
深入淺出 MVC
 
PHP7 Presentation
PHP7 PresentationPHP7 Presentation
PHP7 Presentation
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Building Content Types with Dexterity
Building Content Types with DexterityBuilding Content Types with Dexterity
Building Content Types with Dexterity
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hope
 
jQuery Plugin Creation
jQuery Plugin CreationjQuery Plugin Creation
jQuery Plugin Creation
 
Twig: Friendly Curly Braces Invade Your Templates!
Twig: Friendly Curly Braces Invade Your Templates!Twig: Friendly Curly Braces Invade Your Templates!
Twig: Friendly Curly Braces Invade Your Templates!
 
Laying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme developmentLaying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme development
 
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
 
xml-motor ~ What,Why,How
xml-motor ~ What,Why,Howxml-motor ~ What,Why,How
xml-motor ~ What,Why,How
 
Sa
SaSa
Sa
 
From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)From Hacker to Programmer (w/ Webpack, Babel and React)
From Hacker to Programmer (w/ Webpack, Babel and React)
 

Viewers also liked

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
 
E z conference 2016 : The Next Generation of Innovative Applications: Powere...
E z conference 2016  : The Next Generation of Innovative Applications: Powere...E z conference 2016  : The Next Generation of Innovative Applications: Powere...
E z conference 2016 : The Next Generation of Innovative Applications: Powere...Kaliop-slide
 
Introducing eZ Publish Platform 5.1 - webinar
Introducing eZ Publish Platform 5.1 - webinarIntroducing eZ Publish Platform 5.1 - webinar
Introducing eZ Publish Platform 5.1 - webinarRoland Benedetti
 
eZ Publish Platform 5.4 public webinar
eZ Publish Platform 5.4 public webinareZ Publish Platform 5.4 public webinar
eZ Publish Platform 5.4 public webinarRoland Benedetti
 
eZ UnConference - Z Publish top-performance through mastery (and extension) o...
eZ UnConference - Z Publish top-performance through mastery (and extension) o...eZ UnConference - Z Publish top-performance through mastery (and extension) o...
eZ UnConference - Z Publish top-performance through mastery (and extension) o...Kaliop-slide
 
Web performances : Is It not the right time to (re)consider CMS ?
Web performances : Is It not the right time to (re)consider CMS ?Web performances : Is It not the right time to (re)consider CMS ?
Web performances : Is It not the right time to (re)consider CMS ?Kaliop-slide
 
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agileKaliop-slide
 
L’amélioration continue de votre environnement de travail et de votre entrepr...
L’amélioration continue de votre environnement de travail et de votre entrepr...L’amélioration continue de votre environnement de travail et de votre entrepr...
L’amélioration continue de votre environnement de travail et de votre entrepr...Kaliop-slide
 
eZ Publish & Deployment of a multi-site platform
eZ Publish & Deployment of a multi-site platformeZ Publish & Deployment of a multi-site platform
eZ Publish & Deployment of a multi-site platformKaliop-slide
 
Building Open Source Identity Management with FreeIPA
Building Open Source Identity Management with FreeIPABuilding Open Source Identity Management with FreeIPA
Building Open Source Identity Management with FreeIPALDAPCon
 

Viewers also liked (10)

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 ?
 
E z conference 2016 : The Next Generation of Innovative Applications: Powere...
E z conference 2016  : The Next Generation of Innovative Applications: Powere...E z conference 2016  : The Next Generation of Innovative Applications: Powere...
E z conference 2016 : The Next Generation of Innovative Applications: Powere...
 
Introducing eZ Publish Platform 5.1 - webinar
Introducing eZ Publish Platform 5.1 - webinarIntroducing eZ Publish Platform 5.1 - webinar
Introducing eZ Publish Platform 5.1 - webinar
 
eZ Publish Platform 5.4 public webinar
eZ Publish Platform 5.4 public webinareZ Publish Platform 5.4 public webinar
eZ Publish Platform 5.4 public webinar
 
eZ UnConference - Z Publish top-performance through mastery (and extension) o...
eZ UnConference - Z Publish top-performance through mastery (and extension) o...eZ UnConference - Z Publish top-performance through mastery (and extension) o...
eZ UnConference - Z Publish top-performance through mastery (and extension) o...
 
Web performances : Is It not the right time to (re)consider CMS ?
Web performances : Is It not the right time to (re)consider CMS ?Web performances : Is It not the right time to (re)consider CMS ?
Web performances : Is It not the right time to (re)consider CMS ?
 
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile
 
L’amélioration continue de votre environnement de travail et de votre entrepr...
L’amélioration continue de votre environnement de travail et de votre entrepr...L’amélioration continue de votre environnement de travail et de votre entrepr...
L’amélioration continue de votre environnement de travail et de votre entrepr...
 
eZ Publish & Deployment of a multi-site platform
eZ Publish & Deployment of a multi-site platformeZ Publish & Deployment of a multi-site platform
eZ Publish & Deployment of a multi-site platform
 
Building Open Source Identity Management with FreeIPA
Building Open Source Identity Management with FreeIPABuilding Open Source Identity Management with FreeIPA
Building Open Source Identity Management with FreeIPA
 

Similar to Ezobject wrapper workshop

Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.WO Community
 
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UICustomizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UITech OneStop
 
oop_in_php_tutorial_for_killerphp.com
oop_in_php_tutorial_for_killerphp.comoop_in_php_tutorial_for_killerphp.com
oop_in_php_tutorial_for_killerphp.comtutorialsruby
 
oop_in_php_tutorial_for_killerphp.com
oop_in_php_tutorial_for_killerphp.comoop_in_php_tutorial_for_killerphp.com
oop_in_php_tutorial_for_killerphp.comtutorialsruby
 
Oop in php_tutorial_for_killerphp.com
Oop in php_tutorial_for_killerphp.comOop in php_tutorial_for_killerphp.com
Oop in php_tutorial_for_killerphp.comayandoesnotemail
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactChen-Tien Tsai
 
Real World Caching with Ruby on Rails
Real World Caching with Ruby on RailsReal World Caching with Ruby on Rails
Real World Caching with Ruby on RailsDavid Roberts
 
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes][HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]Wong Hoi Sing Edison
 
最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!
最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!
最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!Liwei Chou
 
How to build a production-ready in-memory-based application in 1 hour
How to build a production-ready in-memory-based application in 1 hourHow to build a production-ready in-memory-based application in 1 hour
How to build a production-ready in-memory-based application in 1 hourTom Diederich
 
MacRuby for Fun and Profit
MacRuby for Fun and ProfitMacRuby for Fun and Profit
MacRuby for Fun and ProfitJoshua Ballanco
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworksKirk Madera
 

Similar to Ezobject wrapper workshop (20)

Oop in php_tutorial
Oop in php_tutorialOop in php_tutorial
Oop in php_tutorial
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
 
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UICustomizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
 
oop_in_php_tutorial_for_killerphp.com
oop_in_php_tutorial_for_killerphp.comoop_in_php_tutorial_for_killerphp.com
oop_in_php_tutorial_for_killerphp.com
 
oop_in_php_tutorial_for_killerphp.com
oop_in_php_tutorial_for_killerphp.comoop_in_php_tutorial_for_killerphp.com
oop_in_php_tutorial_for_killerphp.com
 
Oop in php_tutorial_for_killerphp.com
Oop in php_tutorial_for_killerphp.comOop in php_tutorial_for_killerphp.com
Oop in php_tutorial_for_killerphp.com
 
Oop in php tutorial
Oop in php tutorialOop in php tutorial
Oop in php tutorial
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + react
 
tutorial54
tutorial54tutorial54
tutorial54
 
tutorial54
tutorial54tutorial54
tutorial54
 
Real World Caching with Ruby on Rails
Real World Caching with Ruby on RailsReal World Caching with Ruby on Rails
Real World Caching with Ruby on Rails
 
l2-es6-160830040119.pdf
l2-es6-160830040119.pdfl2-es6-160830040119.pdf
l2-es6-160830040119.pdf
 
Oop's in php
Oop's in php Oop's in php
Oop's in php
 
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes][HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]
 
最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!
最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!
最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!
 
How to build a production-ready in-memory-based application in 1 hour
How to build a production-ready in-memory-based application in 1 hourHow to build a production-ready in-memory-based application in 1 hour
How to build a production-ready in-memory-based application in 1 hour
 
Lecture 2: ES6 / ES2015 Slide
Lecture 2: ES6 / ES2015 SlideLecture 2: ES6 / ES2015 Slide
Lecture 2: ES6 / ES2015 Slide
 
React Django Presentation
React Django PresentationReact Django Presentation
React Django Presentation
 
MacRuby for Fun and Profit
MacRuby for Fun and ProfitMacRuby for Fun and Profit
MacRuby for Fun and Profit
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
 

More from Kaliop-slide

L'agilité au service de l'innovation
L'agilité au service de l'innovationL'agilité au service de l'innovation
L'agilité au service de l'innovationKaliop-slide
 
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...Kaliop-slide
 
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...Kaliop-slide
 
Web performance optimization
Web performance optimizationWeb performance optimization
Web performance optimizationKaliop-slide
 
How to deploy & optimize eZ Publish (2014)
How to deploy & optimize eZ Publish (2014)How to deploy & optimize eZ Publish (2014)
How to deploy & optimize eZ Publish (2014)Kaliop-slide
 
eZ Publish vs Drupal - technical battle
eZ Publish vs Drupal - technical battleeZ Publish vs Drupal - technical battle
eZ Publish vs Drupal - technical battleKaliop-slide
 
Utilisation d’eZ Flow sur le site www.kaliop.fr
Utilisation d’eZ Flow sur le site www.kaliop.frUtilisation d’eZ Flow sur le site www.kaliop.fr
Utilisation d’eZ Flow sur le site www.kaliop.frKaliop-slide
 
Demystifying eZ Publish 5.x for eZ Publish 4.0 developers
Demystifying eZ Publish 5.x for eZ Publish 4.0 developersDemystifying eZ Publish 5.x for eZ Publish 4.0 developers
Demystifying eZ Publish 5.x for eZ Publish 4.0 developersKaliop-slide
 
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ Publish
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ PublishWebinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ Publish
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ PublishKaliop-slide
 
Bien choisir sa solution e-commerce
Bien choisir sa solution e-commerceBien choisir sa solution e-commerce
Bien choisir sa solution e-commerceKaliop-slide
 
Webinar : ezpublish pour vos projets e-tourisme
Webinar : ezpublish pour vos projets e-tourismeWebinar : ezpublish pour vos projets e-tourisme
Webinar : ezpublish pour vos projets e-tourismeKaliop-slide
 
How to deploy & optimize eZ Publish
How to deploy & optimize eZ PublishHow to deploy & optimize eZ Publish
How to deploy & optimize eZ PublishKaliop-slide
 
Optimisez vos flux commerciaux avec la marketing automation
Optimisez vos flux commerciaux avec la marketing automationOptimisez vos flux commerciaux avec la marketing automation
Optimisez vos flux commerciaux avec la marketing automationKaliop-slide
 
Tour de Contrôle (Kaliop E-Commerce Dataflow System)
Tour de Contrôle (Kaliop E-Commerce Dataflow System)Tour de Contrôle (Kaliop E-Commerce Dataflow System)
Tour de Contrôle (Kaliop E-Commerce Dataflow System)Kaliop-slide
 
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...Kaliop-slide
 
Redeploiement d’une plateforme eZpublish multisites internationale
Redeploiement d’une plateforme eZpublish multisites internationaleRedeploiement d’une plateforme eZpublish multisites internationale
Redeploiement d’une plateforme eZpublish multisites internationaleKaliop-slide
 
Workshop eZ Publish Caching Mechanisms
Workshop eZ Publish Caching MechanismsWorkshop eZ Publish Caching Mechanisms
Workshop eZ Publish Caching MechanismsKaliop-slide
 
CHALLENGE Ez On tour, outil de publication web pour le e-tourisme
CHALLENGE Ez On tour, outil de publication web pour le e-tourismeCHALLENGE Ez On tour, outil de publication web pour le e-tourisme
CHALLENGE Ez On tour, outil de publication web pour le e-tourismeKaliop-slide
 
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...Kaliop-slide
 

More from Kaliop-slide (20)

L'agilité au service de l'innovation
L'agilité au service de l'innovationL'agilité au service de l'innovation
L'agilité au service de l'innovation
 
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...
 
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...
 
Web performance optimization
Web performance optimizationWeb performance optimization
Web performance optimization
 
How to deploy & optimize eZ Publish (2014)
How to deploy & optimize eZ Publish (2014)How to deploy & optimize eZ Publish (2014)
How to deploy & optimize eZ Publish (2014)
 
eZ Publish vs Drupal - technical battle
eZ Publish vs Drupal - technical battleeZ Publish vs Drupal - technical battle
eZ Publish vs Drupal - technical battle
 
Utilisation d’eZ Flow sur le site www.kaliop.fr
Utilisation d’eZ Flow sur le site www.kaliop.frUtilisation d’eZ Flow sur le site www.kaliop.fr
Utilisation d’eZ Flow sur le site www.kaliop.fr
 
Demystifying eZ Publish 5.x for eZ Publish 4.0 developers
Demystifying eZ Publish 5.x for eZ Publish 4.0 developersDemystifying eZ Publish 5.x for eZ Publish 4.0 developers
Demystifying eZ Publish 5.x for eZ Publish 4.0 developers
 
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ Publish
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ PublishWebinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ Publish
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ Publish
 
Bien choisir sa solution e-commerce
Bien choisir sa solution e-commerceBien choisir sa solution e-commerce
Bien choisir sa solution e-commerce
 
Webinar : ezpublish pour vos projets e-tourisme
Webinar : ezpublish pour vos projets e-tourismeWebinar : ezpublish pour vos projets e-tourisme
Webinar : ezpublish pour vos projets e-tourisme
 
How to deploy & optimize eZ Publish
How to deploy & optimize eZ PublishHow to deploy & optimize eZ Publish
How to deploy & optimize eZ Publish
 
Optimisez vos flux commerciaux avec la marketing automation
Optimisez vos flux commerciaux avec la marketing automationOptimisez vos flux commerciaux avec la marketing automation
Optimisez vos flux commerciaux avec la marketing automation
 
Tour de Contrôle (Kaliop E-Commerce Dataflow System)
Tour de Contrôle (Kaliop E-Commerce Dataflow System)Tour de Contrôle (Kaliop E-Commerce Dataflow System)
Tour de Contrôle (Kaliop E-Commerce Dataflow System)
 
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...
 
Redeploiement d’une plateforme eZpublish multisites internationale
Redeploiement d’une plateforme eZpublish multisites internationaleRedeploiement d’une plateforme eZpublish multisites internationale
Redeploiement d’une plateforme eZpublish multisites internationale
 
Workshop eZ Publish Caching Mechanisms
Workshop eZ Publish Caching MechanismsWorkshop eZ Publish Caching Mechanisms
Workshop eZ Publish Caching Mechanisms
 
CJW Newsletter
CJW NewsletterCJW Newsletter
CJW Newsletter
 
CHALLENGE Ez On tour, outil de publication web pour le e-tourisme
CHALLENGE Ez On tour, outil de publication web pour le e-tourismeCHALLENGE Ez On tour, outil de publication web pour le e-tourisme
CHALLENGE Ez On tour, outil de publication web pour le e-tourisme
 
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

Ezobject wrapper workshop

  • 1. It’s all about eXperience EzobjectWrapper Workshop
  • 2. 1. Why we needed a wrapper 2. What is ezobjectwrapper ? 3. Hands on exercises 4. Q&A 2 EzobjectWrapper Workshop
  • 3. Why we needed a wrapper 01 ● Performance issues when displaying multiple contents in the same page with ez_content: viewLocation ● Rendering rules in classes rather than repositories/controller ● Listing different content types with the same HTML code 3
  • 4. What is EzobjectWrapper ? 02 ● Bundle originally made by Antonin Savoie, dev@Kaliop ● A wrapper encapsulates content & location (lazy loading) ● Each wrapper provides its own methods / business logic ● Factory creates corresponding wrapper object depending on content type ● Bonus : renderLocation twig function 4
  • 5. Github repos Titre de la présentation à personnaliser 5 https://github.com/kaliop/ezobjectwrapper https://github.com/kaliop/ezobjectwrapper-workshop
  • 6. Encapsulates content & location Titre de la présentation à personnaliser 6 public function __construct(ContainerInterface $container, $location = null, $content = null) { …. $this->location = $location; $this->content = $content; }
  • 7. Lazy loading Titre de la présentation à personnaliser 7 public function content() { if($this->content == null){ $this->content = $this->repository->getContentService()->loadContent($this->location->contentId); } return $this->content; }
  • 8. EzobjectWrapper factory Titre de la présentation à personnaliser 8 public function buildeZObjectWrapper($source) { $locationSource = null; $contentSource = null; if(is_numeric($source)) { $locationSource = $source = $this->repository->getLocationService()->loadLocation($source); } elseif($source instanceof Content) { $contentSource = $source; } else { $locationSource = $source; } $contentTypeIdentifier = $this->repository->getContentTypeService()->loadContentType($source->contentInfo->contentTypeId)->identifier; $mappingEntities = $this->container->getParameter('class_mapping'); $defaultClass = $this->container->getParameter('default_ezobject_class'); if(isset($mappingEntities[$contentTypeIdentifier])){ $className = $mappingEntities[$contentTypeIdentifier]; } else { $className = $defaultClass; } $objectWrapper = new $className($this->container, $locationSource, $contentSource); return $objectWrapper; }
  • 9. renderLocation Twig function Titre de la présentation à personnaliser 9 {{ render( controller( "ez_content:viewLocation", {"locationId": 123, "viewType": "line"} ) ) }} Before : {{ renderLocation( 123, "line" )|raw }} After : public function renderLocation($locationID, $viewType, $params = array()) { $rendering = $this->container->get('ezpublish.controller.content.view')->viewLocation($locationID, $viewType, false, $params); return htmlspecialchars_decode($rendering->getContent()); } How it works :
  • 11. Check your ezobjwrapper instance is working Titre de la présentation à personnaliser 11 $ cd /var/www/summercamp/workshops/ezobjwrapper $ git pull $ git checkout step-0 Open http://ezobjwrapper.ezsc in your browser