Submit Search
Upload
The eZ Platform view layer – eZ Conference 2016
•
1 like
•
435 views
Bertrand Dunogier
Follow
An in-depth presentation of the eZ Platform view layer, built around Symfony's MVC stack.
Read less
Read more
Technology
Report
Share
Report
Share
1 of 27
Download now
Download to read offline
Recommended
ASP.NET Core 1 for MVC- and WebAPI-Devs
ASP.NET Core 1 for MVC- and WebAPI-Devs
Manfred Steyer
Easy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & Drush
QArea
Interview with Delaware North CMO Todd Merry
Interview with Delaware North CMO Todd Merry
Jared Frank
kerons's resume 2
kerons's resume 2
Keron Crawford
Maratón de lectura
Maratón de lectura
Andres Hernandez
Tutorial foro
Tutorial foro
TutorialesCampusEASP
Angular js animate shashikant bhongale -20-7-16
Angular js animate shashikant bhongale -20-7-16
Shashikant Bhongale
George Cooper CV Sept 2016 Final
George Cooper CV Sept 2016 Final
George William Cooper
Recommended
ASP.NET Core 1 for MVC- and WebAPI-Devs
ASP.NET Core 1 for MVC- and WebAPI-Devs
Manfred Steyer
Easy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & Drush
QArea
Interview with Delaware North CMO Todd Merry
Interview with Delaware North CMO Todd Merry
Jared Frank
kerons's resume 2
kerons's resume 2
Keron Crawford
Maratón de lectura
Maratón de lectura
Andres Hernandez
Tutorial foro
Tutorial foro
TutorialesCampusEASP
Angular js animate shashikant bhongale -20-7-16
Angular js animate shashikant bhongale -20-7-16
Shashikant Bhongale
George Cooper CV Sept 2016 Final
George Cooper CV Sept 2016 Final
George William Cooper
Etika pelayanan kefarmasian
Etika pelayanan kefarmasian
khrisnaagung77
What impacts customer loyalty
What impacts customer loyalty
Kiren Lakhani
Krisis crimea-sebuah-analisis
Krisis crimea-sebuah-analisis
Kresno Aji
Shared Security Responsibility Model of AWS
Shared Security Responsibility Model of AWS
Akshay Mathur
Ver participantes y Envío de mensajes en moodle
Ver participantes y Envío de mensajes en moodle
TutorialesCampusEASP
Internship review (Civil Engineering)
Internship review (Civil Engineering)
Syeda Nusrath Fathima
Permen no.19 th_2016 ttg pedoman pengelolaan barang milik daerah
Permen no.19 th_2016 ttg pedoman pengelolaan barang milik daerah
Ulfah Hanum
Sitecore experience platform session 1
Sitecore experience platform session 1
Anindita Bhattacharya
La Galatea
La Galatea
isarevi
La Galatea
La Galatea
isarevi
How Cloud Enhances Agile Software Development
How Cloud Enhances Agile Software Development
Suyati Technologies
iOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI Components
Asim Rais Siddiqui
Zero redeployment with JRebel
Zero redeployment with JRebel
Minh Hoang
Fame
Fame
rpatil82
Angular%201%20to%20angular%202
Angular%201%20to%20angular%202
Ran Wahle
Chrome & Webkit overview
Chrome & Webkit overview
Bin Chen
javagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platform
Tonny Madsen
Spring Basics
Spring Basics
ThirupathiReddy Vajjala
Spring framework-tutorial
Spring framework-tutorial
vinayiqbusiness
Building richwebapplicationsusingasp
Building richwebapplicationsusingasp
Giovanni Javier Jimenez Cadena
Php Framework
Php Framework
cncwebworld
Php framework
Php framework
cncwebworld
More Related Content
Viewers also liked
Etika pelayanan kefarmasian
Etika pelayanan kefarmasian
khrisnaagung77
What impacts customer loyalty
What impacts customer loyalty
Kiren Lakhani
Krisis crimea-sebuah-analisis
Krisis crimea-sebuah-analisis
Kresno Aji
Shared Security Responsibility Model of AWS
Shared Security Responsibility Model of AWS
Akshay Mathur
Ver participantes y Envío de mensajes en moodle
Ver participantes y Envío de mensajes en moodle
TutorialesCampusEASP
Internship review (Civil Engineering)
Internship review (Civil Engineering)
Syeda Nusrath Fathima
Permen no.19 th_2016 ttg pedoman pengelolaan barang milik daerah
Permen no.19 th_2016 ttg pedoman pengelolaan barang milik daerah
Ulfah Hanum
Sitecore experience platform session 1
Sitecore experience platform session 1
Anindita Bhattacharya
La Galatea
La Galatea
isarevi
La Galatea
La Galatea
isarevi
How Cloud Enhances Agile Software Development
How Cloud Enhances Agile Software Development
Suyati Technologies
Viewers also liked
(11)
Etika pelayanan kefarmasian
Etika pelayanan kefarmasian
What impacts customer loyalty
What impacts customer loyalty
Krisis crimea-sebuah-analisis
Krisis crimea-sebuah-analisis
Shared Security Responsibility Model of AWS
Shared Security Responsibility Model of AWS
Ver participantes y Envío de mensajes en moodle
Ver participantes y Envío de mensajes en moodle
Internship review (Civil Engineering)
Internship review (Civil Engineering)
Permen no.19 th_2016 ttg pedoman pengelolaan barang milik daerah
Permen no.19 th_2016 ttg pedoman pengelolaan barang milik daerah
Sitecore experience platform session 1
Sitecore experience platform session 1
La Galatea
La Galatea
La Galatea
La Galatea
How Cloud Enhances Agile Software Development
How Cloud Enhances Agile Software Development
Similar to The eZ Platform view layer – eZ Conference 2016
iOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI Components
Asim Rais Siddiqui
Zero redeployment with JRebel
Zero redeployment with JRebel
Minh Hoang
Fame
Fame
rpatil82
Angular%201%20to%20angular%202
Angular%201%20to%20angular%202
Ran Wahle
Chrome & Webkit overview
Chrome & Webkit overview
Bin Chen
javagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platform
Tonny Madsen
Spring Basics
Spring Basics
ThirupathiReddy Vajjala
Spring framework-tutorial
Spring framework-tutorial
vinayiqbusiness
Building richwebapplicationsusingasp
Building richwebapplicationsusingasp
Giovanni Javier Jimenez Cadena
Php Framework
Php Framework
cncwebworld
Php framework
Php framework
cncwebworld
Spring Framework
Spring Framework
tola99
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere Portal
Himanshu Mendiratta
Vue 2 vs Vue 3.pptx
Vue 2 vs Vue 3.pptx
Albiorix Technology
My Very First Zf App Part One
My Very First Zf App Part One
isaaczfoster
jsf2 Notes
jsf2 Notes
Rajiv Gupta
AngularJS: Overview & Key Features
AngularJS: Overview & Key Features
Mohamad Al Asmar
A report on mvc using the information
A report on mvc using the information
Toushik Paul
Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjects
Srikanth Shenoy
Pde build
Pde build
Owen Ou
Similar to The eZ Platform view layer – eZ Conference 2016
(20)
iOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI Components
Zero redeployment with JRebel
Zero redeployment with JRebel
Fame
Fame
Angular%201%20to%20angular%202
Angular%201%20to%20angular%202
Chrome & Webkit overview
Chrome & Webkit overview
javagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platform
Spring Basics
Spring Basics
Spring framework-tutorial
Spring framework-tutorial
Building richwebapplicationsusingasp
Building richwebapplicationsusingasp
Php Framework
Php Framework
Php framework
Php framework
Spring Framework
Spring Framework
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere Portal
Vue 2 vs Vue 3.pptx
Vue 2 vs Vue 3.pptx
My Very First Zf App Part One
My Very First Zf App Part One
jsf2 Notes
jsf2 Notes
AngularJS: Overview & Key Features
AngularJS: Overview & Key Features
A report on mvc using the information
A report on mvc using the information
Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjects
Pde build
Pde build
More from Bertrand Dunogier
The eZ Platform Query Field
The eZ Platform Query Field
Bertrand Dunogier
Dev Symfony2 rapide avec un framework de contenu
Dev Symfony2 rapide avec un framework de contenu
Bertrand Dunogier
Discover eZ Publish: why you have to know this product
Discover eZ Publish: why you have to know this product
Bertrand Dunogier
eZ Publish cluster unleashed revisited
eZ Publish cluster unleashed revisited
Bertrand Dunogier
eZ Publish REST API v2
eZ Publish REST API v2
Bertrand Dunogier
E zsc2012 rest-api-v2
E zsc2012 rest-api-v2
Bertrand Dunogier
eZ Publish Cluster Unleashed
eZ Publish Cluster Unleashed
Bertrand Dunogier
eZ Publish Asynchronous Content Publishing
eZ Publish Asynchronous Content Publishing
Bertrand Dunogier
More from Bertrand Dunogier
(8)
The eZ Platform Query Field
The eZ Platform Query Field
Dev Symfony2 rapide avec un framework de contenu
Dev Symfony2 rapide avec un framework de contenu
Discover eZ Publish: why you have to know this product
Discover eZ Publish: why you have to know this product
eZ Publish cluster unleashed revisited
eZ Publish cluster unleashed revisited
eZ Publish REST API v2
eZ Publish REST API v2
E zsc2012 rest-api-v2
E zsc2012 rest-api-v2
eZ Publish Cluster Unleashed
eZ Publish Cluster Unleashed
eZ Publish Asynchronous Content Publishing
eZ Publish Asynchronous Content Publishing
Recently uploaded
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Safe Software
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Pooja Nehwal
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
Softradix Technologies
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
null - The Open Security Community
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
soniya singh
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Padma Pradeep
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
The transition to renewables in India.pdf
The transition to renewables in India.pdf
Competition Advisory Services (India) LLP
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
XfilesPro
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Deakin University
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Alan Dix
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Enjoy Anytime
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
Recently uploaded
(20)
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
The transition to renewables in India.pdf
The transition to renewables in India.pdf
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Slack Application Development 101 Slides
Slack Application Development 101 Slides
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
The eZ Platform view layer – eZ Conference 2016
1.
1 The eZ Platform View Layer Bertrand Dunogier Platform Lead bd@ez.no
@bdunogier This presentation is online: bdunogier.github.io/talks/ezconf2016-ezplatform-views
2.
2 About me 11th year at eZ, 13th year around it Platform backend lead engineer Focused on REST & Symfony layers
3.
3 Plan I. The View Layer II. Changes in Platform 1.x II. Query types V. The Query Controller V. Using the View layer in your projects
4.
4 . 1 The View Layer A layer that wraps around Symfony's MVC. For a given route, it loads a Value and renders it. It is mainly used to render content using UrlAliases and ez_content:viewAction. The template and controller can be customized using view configuration: ezpublish: system: site: content_view: full: article: template:
'content/view/full/article.html.twig' controller: 'app.article_controller:viewArticleAction' match: IdentifierContentType: 'article'
5.
4 . 2 How it worked in eZ Publish 5.x Two types of views: location_view and content_view. public
function showArticleAction( $locationId, $viewType, $layout = false, array $params = array { return $this->get( 'ez_content' )->viewLocation( $locationId, $viewType, $layout, ['some_variable' => 'some_value'] + $params ); }
6.
4 . 3 Drawbacks Requires complex calls Error prone Tight coupling with the extended view controller, complex BC
7.
4 . 4
8.
4 . 5 What has changed in Platform 1.x location_view is deprecated, and only content_view should be used**. Custom controllers do not need to inherit from a built-in one anymore. namespace
AppBundleController; class ArticleController { public function viewArticleAction(ContentView $view) { $view->addParameters(['some_value' => 'whatever']); return $view; } } Parameters will be made available in the view template.
9.
5 . 1 Query types Added in eZ Platform 1.x. They are named Query factories that support parameters, and can be registered either by naming convention, or using a service tag. $query
= $queryType->getQuery(['paramName' => $paramValue]); $searchService->findLocations($query);
10.
5 . 2 Use-case: LocationChildren query type A QueryType that builds a LocationQuery searching for children of a given location id. In addition to the parentLocationId parameter, it optionally accepts limit and offset: $query
= $queryType->getQuery(['parentLocationId' => 2, 'limit' => 5]); $searchService->findLocations($query);
11.
5 . 3 LocationChildren QueryType structure All QueryTypes must implement the eZPublishCoreQueryTypeQueryType interface, that has three methods: namespace
AppBundleQueryType; class LocationChildrenQueryType implements QueryType { public function getQuery(array $parameters = []): Query public function getSupportedParameters(): array public static function getName(): string }
12.
5 . 4 The getSupportedParameters() method Returns the supported parameters names. public
function getSupportedParameters() { return ['parentLocationId', 'offset', 'limit']; }
13.
5 . 5 The getName static method Returns the name of the QueryType. public
function getName() { return 'app.location_children'; } (Thank you Mr. Obvious)
14.
5 . 6 The getQuery() method Called to build the Query Receives the build parameters Returns the Query object public
function getQuery(array $parameters = []) { return new LocationQuery([ 'filter' => new CriterionParentLocationId($parameters['parentLocationId']), 'offset' => $parameters['offset'] ?: 0, 'limit' => $parameters['limit'] ?: 10, ]); }
15.
5 . 7 Using QueryTypes from PHP inject a QueryType using its service use the ezpublish.query_type.registry service
16.
6 . 1 The Query controller A built-in view controller that runs a Query from a QueryType, and assigns the results to the view. It supports mapping of viewed content/location properties to QueryType parameters.
17.
Usage example ezpublish: system: site: content_view: full: gallery: template: 'content/view/full/gallery.html.twig' controller: 'ez_query:locationQueryAction' params: query: query_type:
app.location_children parameters: parentLocationId: @=location.id assign_results_to: images The SearchResult object is assigned to the 'images' twig variable: {% for searchResult in images.searchHits %} {{ render( controller( 'ez_content:viewAction',
18.
6 . 2 {'content':
searchResult.valueObject, 'viewType': 'embed'} ) }} {% endfor %}
19.
6 . 3 Conclusion And questions maybe ?
20.
7 . 1 Custom Views The View layer can be re-used in order to allow customization of reusable components. I. A value object to view (ex: SystemInfo) II. A View object (ex: SystemInfoView) II. A very short controller (ex: SystemInfoController) V. A ViewBuilder (ex: SystemInfoViewBuilder)
21.
7 . 2 The Value Can be any value object Will be made available in the view templates Loaded from the ViewBuilder, using route parameters
22.
7 . 3 The View object Must implement the View interface May implement the BaseView class Instantiated by the ViewBuilder May implement other View interfaces to add Matchers support Examples: ContentValueView, LocationValueView
23.
7 . 4 The ViewBuilder Must implement the ViewBuilder interface Must be registered with the ezpublish.view_builder.registry Manual registration for now, using a compiler pass / DIC extension Uses the matched controller's name to filter requests Must call a ViewConfigurator to apply templates & controller configuration
24.
7 . 5 Custom matchers Allows custom business rules for view matching. Example: ViewMatcherSystemInfoIdentifier. Requires a custom ViewProvider and ViewMatcherFactory. Examples: support_tools.view.system_info.provider and support_tools.view.matcher_factory in view.yml.
25.
7 . 6 Optional: View configuration Siteaccess aware, semantic view configuration. Requirements: a ConfigParser. Example: SystemInfoViewParser injection into the ezpublish extension, if you want it below
26.
7 . 7 Improvements possibilities DX: matchers view providers view configuration
27.
8 Conclusion & Questions
Download now