SlideShare a Scribd company logo
1 of 57
Download to read offline
eZ Unconf #2
eZ Publish 5.1 Introduction
Florent Huck – florent.huck@ez.no
Philippe Vincent-Royol – philippe.vincent-royol@ez.no
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
SLIDE	
  2	
  
•  Welcome to eZ Publish
•  Dual Core
•  What's change between eZ 4, 5.0, 5.1 ?
•  That's one small step for a developper ...
•  Bundle eZ 5 full stack
•  Multisite with one repository
•  Templates override
•  Deeper in source code
•  ... one giant leap for production !
•  Cache introduction
•  Http Cache
•  Varnish configuration
2
Agenda
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Welcome to eZ Publish
3
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
•  Simple Integration with our API
•  HMVC (Hierarchical Model View Controller) stack
•  Decoupled Composents
•  Dependency Injection
•  New Template Engine
•  Extensible, Open, Reliable
•  Backward Compatibility
SLIDE 4
eZ Publish 5 – Wall of Fame
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol SLIDE 5
eZ Publish 5 - Architecture
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol SLIDE 6
eZ Publish Public API
For the first time ever, a Public API for eZ
Publish: a major step forward!
•  All the CMS features available from PHP
code
• easier to develop import/export scripts
• easier to add new content mgmt
interfaces
•  A clear API definition, which means better
documentation for developers
•  Allows refactoring of core code for improved
performance, scalability, etc… while having
•  long term backward compatibility of your
custom developments
•  Fully extensible, extend it with your custom
features relying on the same framework
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol SLIDE 7
eZ Publish Rest API v. 2
With version 5, eZ Publish REST API covers
the whole scope of the content management
engine and not only a limited part (read only)
The REST API fully relies now on the Public
API for better maintainability and simplicity
It is the reliable and maintainable for:
•  Native mobile applications
•  Integration in existing business
applications
•  Social Media Integrations
•  Any other application (desktop application,
internet TV apps…)
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol SLIDE 8
Handle big data content repositories
•  A clear goal to provide
Relational, NoSQL and Hybrid
storage system
•  A persistence API enabling (eZ
or 3rd party) to develop the
support of any storage system
•  Long term backward
compatibility of your custom
developments
•  Bridging eZ Publish 4.x storage
system for backward
compatibility with legacy
» eZ Publish 5 is the first content management platform designed to handle Big
Content & Big Data!
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
A whole new framework available for
developers
•  Extensible HMVC structure
•  Clean and maintainable modularity via
native dependency injection
•  Easier to merge your custom apps with eZ
Publish
•  A wide range of existing resources on top of
Symfony
Benefits & Opportunities
SLIDE 9
Symfony2, a new Web framework for eZ Publish
» eZ Publish 5 integrates the Symfony 2 framework. What does this mean?
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
A new template engine: Twig
•  Enhanced rendering speed
•  Easier and more extensible
templating language
•  Support of hierarchical requests
•  Better IDE support
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Advantages
•  Knowledgeable Community
•  Standardization
• Time saving
• Re-usability of code
• Re-usability of knowledge
•  Reduced maintenance costs at the
component level
•  Faster introduction of new features
•  Faster development of items such as
alternate database options
•  Faster and more efficient kernel
Advantages & Disaventages
SLIDE 10
Symfony2, a new Web framework for eZ Publish
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Disavantages
•  New development APIs to learn
•  Porting of legacy code
•  Transition period
•  No more excuses not to do your work
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol SLIDE 11
What’s change ?
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
eZ Publish Evolution
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Legacy system :
is an old method, technology, computer system, or application program. The legacy
system may or may not remain in use. Even if it is no longer used, it may continue to
impact the organization due to its historical role.
(Wikipedia)
Changes
•  Online resources
•  File structure
•  API
•  Terminology
•  Feature implementation
SLIDE 12
What Changes?
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
/ez5
ezpublish configurations, cache, logs
ezpublish_legacy the full Legacy Stack
… incl. legacy extensions
src your bundles
vendor libraries from 3rd parties
ezystems Kernel and 3 bundles (core, legacy, rest)
web all files which are accessible from the web
•  Static assets are either copied or symlinked from legacy designs / extensions into
the web directory via a cli script
•  Different rewrite rules are needed
•  Per-environment configuration is managed via different frontend controllers in the
web directory
SLIDE 13
File structure
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Translation 4.x to 5.x – content model
SLIDE 14
Terminology
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
4.x	
   5.X	
  
Content	
  Class	
   ContentType	
  
Content	
  Class	
  Group	
   ContentTypeGroup	
  
Datatype	
   FieldType	
  
Node	
   Loca7on	
  
Content	
  Object	
   Content	
  (meta	
  info	
  in	
  ContentInfo)	
  
Content	
  Object	
  Version	
   VersionInfo	
  
Content	
  Object	
  ABribute	
   Field	
  +	
  FieldValue	
  
Content	
  Class	
  ABribute	
   FieldDefini7on	
  
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Translation 4.x to 5.x – feature implementation
SLIDE 15
Features
4.x	
   5.X	
  
eZ	
  Publish	
  Template	
   Twig	
  Template	
  
Extension	
   Bundle	
  
Module	
   Controller	
  class	
  (based	
  on	
  eZBundleEzPublishCoreBundle
Controller)	
  
View	
   Controller	
  ac7on	
  
Fetch	
  func7on	
   Replaced	
  by	
  controller+view,	
  the	
  template	
  "fetch"	
  func7on	
  is	
  
replaced	
  by	
  "render"	
  
Template	
  operator	
   Filter	
  +	
  func7on	
  
seTngs/	
   ezpublish/config	
  and	
  Resources/config	
  on	
  each	
  bundles	
  
site.ini	
   ezpublish.yml	
  
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
As of 5.0, some features are not implemented on the new stack, such
as:
•  Admin Interface; content editing
•  Cluster Mode (works now with eZ 5.1+)
•  Information Collectors
•  Workflows
•  Notifications
•  eZ Find
•  eZ Flow (display of «layout» attribute) (5.1+ includes read part)
•  Multisite with a repository (works now with eZ 5.1+)
Documentation is an effort under way.
You can participate too!
Feature translation 4.x to 5.x – all the rest
SLIDE 16
What Changes
•  Issue Tracker: http://jira.ez.no
•  Developer documentation:
https://confluence.ez.no/display/EZP/eZ+Publish+Documentation
•  API docs:
•  http://ezsystems.github.com/ezpublish-kernel/phpDocumentor/
•  http://pubsvn.ez.no/
•  Also the doc folder inside vendor/ezsystems/ezpublish
•  Source code:
•  https://github.com/ezsystems/ezpublish-legacy => the 4.x code, a.k.a. Legacy Stack
•  https://github.com/ezsystems/ezpublish-kernel => the new kernel (incl. Public API)
•  https://github.com/ezsystems/ezpublish-community => pulling it all together
•  Tutorials: http://share.ez.no as always
•  eZ 5 CheatSheet https://github.com/dspe/ez5_cheatsheet
Online resources
Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved. SLIDE 17
That's one small step for a
developper ...
18
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
eZ Publish 5 – Development mode
SLIDE 19
•  Activated via a custom controller in the new kernel
•  Debug toolbar at bottom of the screen – always in view
•  Full featured profiler
•  Saves data of every profiler run
•  Exception handling gets stricter
•  Easier to keep separate settings per-environment
•  DebugOutput still available when running legacy modules
More customizable in 5.2+ and 2013.5. Have a look at
https://github.com/ezsystems/ezpublish-community/pull/51
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
eZ Publish 5 configuration model
SLIDE 20
The eZ 5’s configuration model uses Symfony2’s configuration model :
YML files
A YML file contains settings that control behavior of a specific part of eZ
Publish
•  ezpublish.yml is the most important YML file
•  config.yml to configure some behavior with Symfony2 for
example
•  Etc …
Settings are managed
manually (by editing the YML file with a text editor)
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
eZ Publish Dynamic Configuration
SLIDE 21
Dynamic configuration with the ConfigResolver can be resolved
depending on a scope.
Available scopes are (in order of precedence)
•  Global:	
  	
   	
   	
  ezseTngs.global.field_templates	
  
•  Siteaccess:	
   	
   	
  ezseTngs.ezdemo_site.field_templates	
  
•  Group:	
   	
   	
   	
  ezseTngs.my_siteaccess_group.field_templates	
  
•  Default:	
  	
   	
   	
  ezseTngs.default.field_templates	
  
Your dynamic settings must comply internally to the following name format:
<namespace>.<scope>.parameter.name	
  
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Dynamic configuration example
SLIDE 22
1.  eZ Publish app configuration - YML configuration : ezpublish.yml
ezpublish:	
  
	
  	
  	
  	
  system:	
  
	
  	
  	
  	
  	
  	
  	
  	
  ezspace:	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  field_templates:	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  -­‐	
  {	
  template:	
  EztTrainingBundle:FieldType:content_fields.html.twig,	
  priority:	
  0	
  }	
  
2.  Bundle configuration - Syntactic configuration : parameters.yml
parameters:	
  
	
  	
  	
  	
  ezseTngs.ezspace.field_templates	
  :	
  	
  
	
  	
  	
  	
  	
  	
  	
  -­‐	
  {	
  template:	
  EztTrainingBundle:FieldType:content_fields.html.twig,	
  priority:	
  0	
  }	
  
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
eZ Publish 5 – BC
SLIDE 23
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Fallback Routing & Content view
SLIDE 24
•  All URIs wich are not matched by Symfony controllers are sent to the Legacy
Stack
•  All existing functionality is thus preserved
•  Including custom modules
•  Including url-aliases
•  For speed, this can be optimized via configuration (f.e. for Admin Interface)
•  Sf controller in use: LegacyKernelController::indexAction
•  Content is rendered using the ViewController ::viewLocation controller
•  Class located in CoreMVCSymfonyControllerContent
•  It uses a twig template for pagelayout: pagelayout.html.twig in DemoBundle
(set in parameters.yml)
•  And a ViewManager to find the appropriate template for the current Location.
We will use the template selection rules.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Legacy template fallback
SLIDE 25
When falling back to the legacy kernel, the old content/view module is run to return
the appropriate view for the given content.
However, the pagelayout is not rendered as it needs to be still rendered by Twig in
the Symfony part, for consistency. In this regard, the system uses the Decorator
design pattern to include the generated view in your layout.
parameters:	
  
	
  	
  	
  	
  #	
  Base	
  layout	
  for	
  legacy	
  fallback	
  
	
  	
  	
  	
  ezpublish_legacy.my_siteaccess.view_default_layout:	
  AcmeDemoBundle::pagelayout.html.twig	
  
	
  
	
  	
  	
  	
  #	
  Block	
  name	
  
	
  	
  	
  	
  ezpublish.content_view.content_block_name:	
  content	
  
	
  
	
  	
  	
  	
  #	
  Module	
  Layout	
  
	
  	
  	
  	
  ezpublish_legacy.my_siteaccess.module_default_layout:	
  AcmeDemoBundle::pagelayout_legacy.html.twig	
  
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Pagelayout example
SLIDE 26
Example	
  of	
  pagelayout.html.twig	
  
	
  
<!DOCTYPE	
  html>	
  
<html>	
  
	
  	
  	
  	
  <head>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <!-­‐-­‐	
  Insert	
  everything	
  you	
  need	
  here	
  that	
  is	
  common	
  -­‐-­‐>	
  
	
  	
  	
  	
  </head>	
  
	
  	
  	
  	
  <body>	
  
	
  	
  	
  	
  	
  	
  	
  	
  {%	
  block	
  content	
  %}{#	
  Regular	
  content	
  will	
  be	
  inserted	
  here	
  #}{%	
  endblock	
  %}	
  
	
  	
  	
  	
  </body>	
  
</html>	
  
	
  
	
  
Example	
  of	
  pagelayout_legacy.html.twig	
  
	
  
{%	
  extends	
  "AcmeDemoBundle::pagelayout.html.twig"	
  %}	
  
	
  	
  
{%	
  block	
  content	
  %}	
  
	
  	
  	
  	
  {#	
  module_result	
  variable	
  is	
  received	
  from	
  the	
  legacy	
  controller.	
  #}	
  
	
  	
  	
  	
  {{	
  module_result.content|raw	
  }}	
  
{%	
  endblock	
  %}	
  
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Some usefull tools
SLIDE 27
•  Display	
  a	
  locaFon	
  
{{	
  render(	
  controller("ez_content:viewLoca7on",	
  {	
  "loca7onId":	
  123,	
  "viewType":	
  "full"	
  }	
  	
  ))	
  }}	
  
•  Display	
  a	
  field	
  
{{	
  ez_render_field(	
  content,	
  "my_field"	
  )	
  }}	
  
•  Include	
  a	
  legacy	
  template	
  
{%	
  include	
  "design:my_folder/my_template.tpl"	
  with	
  {"my_key"	
  :	
  "my_value"	
  }	
  %}	
  
	
  
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Some usefull twig helper
SLIDE 28
Property	
   DescripFon	
  
ezpublish.siteaccess	
   Returns	
  the	
  current	
  siteaccess	
  
ezpublish.requestUriString	
   Returns	
  the	
  request	
  URI	
  string	
  
ezpublish.systemUriString	
   Return	
  the	
  systems	
  URI	
  string	
  
ezpublish.viewParameters	
   Return	
  the	
  view	
  parameters	
  as	
  a	
  hash	
  
ezpublish.viewParametersString	
   Return	
  the	
  view	
  parameters	
  as	
  a	
  string	
  
ezpublish.siteName	
   Return	
  the	
  name	
  of	
  the	
  current	
  siteaccess	
  
ezpublish.legacy	
   Returns	
  legacy	
  informa7on	
  
Property	
   DescripFon	
  
ezpublish.legacy.all	
   Return	
  all	
  parameters	
  
ezpublish.legacy.keys	
   Returns	
  the	
  parameter	
  keys	
  only	
  
ezpublish.legacy.get	
   Returns	
  a	
  parameter	
  by	
  name	
  
ezpublish.legacy.has	
   Returns	
  true	
  if	
  the	
  parameter	
  is	
  defined	
  
Legacy
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Template selection rules system
Simplified view
SLIDE 29
Of course, eZ Publish is a (little) bit more complex but you could remember that
"Override" template
Do	
  we	
  provide	
  an	
  template	
  
selec7on	
  rules?	
  
(override.ini	
  /	
  ezpublish.yml)	
  
Default template
default template
(example.tpl / example.html.twig)
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Template selection rules - Configuration
SLIDE 30
ezpublish:!
system:!
my_siteaccess:!
location_view:!
full:!
welcome_page:!
template: AcmeDemoBundle:full:welcome.html.twig!
match:!
IdLocation: 2!
article_full:!
! ! ! ! ! template: AcmeDemoBundle:full:article.html.twig!
! ! ! ! ! match:!
! ! ! ! ! ! IdentifierContentType: article!
preview:!
article_preview:!
template: AcmeDemoBundle:preview:article.html.twig!
match:!
IdentifierContentType: [article, news]!
Example from ezpublish.yml
location_view and content_view are available in override system
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Multisite – One repository
SLIDE 31
eZ Publish 5.1 provide a way to build multiple website with a single repository, in
different subtrees of content. This system will be extends on next releases.
ezpublish:!
system:!
my_siteaccess:!
content:!
tree_root:!
# Root locationId. Default is top locationId!
location_id: 123!
# Every URL aliases starting with those prefixes will be
! ! ! ! # considered being outside of the subtree starting at!
! ! ! ! # root_location.!
# Default value is an empty array.!
# Prefixes are not case sensitive.!
excluded_uri_prefixes:!
- media!
- users!
Coding Standard !
Bonus
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Coding Standard
SLIDE 33
When contributing code to eZ Publish, you must follow its coding standards.
Remember that the main advantage of standards is that every piece of code
looks and feels familiar, it’s not about this or that being more readable.
•  Use PHP Code Sniffer !
•  Install eZ v2 PHPCodeSniffer standard
(http://github.com/ezsystems/ezcs)
https://github.com/ezsystems/ezpublish-kernel/wiki/codingstandards
Be awesome, use coding standards
Installation & our first bundle !
Exercise
... one giant leap for production !
35
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
The goal of caching in HTTP/1.1 is to eliminate the need to send requests in many
cases, and to eliminate the need to send full responses in many other cases
Types of caches
•  Browser caches: the browser cache is a private cache as cached resources
aren't shared with anyone else
•  Proxy caches: a proxy is a shared cache as many people can be behind a single
one
•  Gateway caches: (a.k.a. Reverse Proxy) like a proxy, it's also a shared cache but
on the server side
More informations about HTTP Rfc: http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-21
Cache - Reminder
Cache me if you can !
SLIDE 36Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
HTTP 1.1 specifies multiple response cache headers that can be used to control
caching behavior:
•  Cache-Control => can control public/private as well as TTL
•  Expires, Max-age => sets a TTL for the given resource
•  Etag => used to revalidate a resource which is already in a cache
(note: E-tag is removed on eZ 5.1)
•  Last-Modified => used to calculate a default TTL if no expiration date is set
or as weak validator
Side note: compression of content is also a good idea to make web pages load faster
•  But take care about gateway caches having to store N versions of each resource
Reminder: HTTP caching
Caching headers
SLIDE 37Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Two caching models are available:
•  Validation
•  the client always checks if the resource it has in its cache is valid (1 network roundtrip)
•  It gets back a “fast” answer (HTTP 304 with no body) if resource dis not change: good
•  Expiration
•  Along with the 1st response, the server sends to the client a TTL
•  As long as the TTL is not expired, the client does not request the resource again
•  This saves one network roundtrip per resource: better
•  But it makes it hard to have a TTL if resources can change on random schedule
•  Workaround: use different URL for each version of resource (e.g. ezjscore, content images)
•  If there is a gateway cache, a PURGE command can be used to overcome this, forcing a
refresh of the resource before the TTL is expired
Reminder: HTTP caching
Validation vs. Expiration
SLIDE 38Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Expiration Model 1/2
SLIDE 39
Including either or both of the Cache-Control: max-age=N or Expires headers
Rick
Rick
Cache
Cache
Backend
Backend
Get /welcome
Get /welcome
« Hello eZ »
With max age
header
200 OK
Cache-Control: maxAge=60
« Hello eZ »200 OK
Cache-Control: maxAge=60
« Hello eZ »
Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Expiration Model 2/2
SLIDE 40
Including either or both of the Cache-Control: max-age=N or Expires headers
Bob
Bob
Cache
Cache
Backend
Backend
Get /welcome
This does not happen …
200 OK
Age = 40
Cache-Control: maxAge=60
« Hello eZ »
… because the cache is fresh
Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Validation Model 1/2
SLIDE 41
Rick
Rick
Cache
Cache
Backend
Backend
Get /welcome
Get /welcome
« Hello eZ »
200 OK
Last Modified: Mon, 12 March
ETag: a3f5gg6d
« Hello eZ »
200 OK
Last Modified: Mon, 12 March
ETag: a3f5gg6d
« Hello eZ »
Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Validation Model 2/2
SLIDE 42
Bob
Bob
Cache
Cache
Backend
Backend
Get /welcome
Get /welcome
If-Modified-Since: Mon, 12 March
If-Node-Match: a3f5gg6d
Do not
generate
response
304 Not Modified
200 OK
Last Modified: Mon, 12 March
ETag: a3f5gg6d
« Hello eZ »
Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Combining Expiration & Validation models 1/3
SLIDE 43
Rick
Rick
Cache
Cache
Backend
Backend
Get /welcome
Get /welcome
« Hello eZ »
200 OK
Cache-control : maxage=60
Last-Modified: Mon, 12 March
« Hello eZ »
200 OK
Cache-control : maxage=60
Last-Modified: Mon, 12 March
« Hello eZ »
Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Combining Expiration & Validation models 2/3
SLIDE 44
Rick
Rick
Cache
Cache
Backend
Backend
Get /welcome
This does not happen …
… because the cache is fresh
200 OK
Cache-control : maxage=60
Age: 40
Last-Modified: Mon, 12 March
« Hello eZ »
Rick comes back after 40s …
Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Combining Expiration & Validation models 3/3
SLIDE 45
Bob
Bob
Cache
Cache
Backend
Backend
Get /welcome Get /welcome
If-Modified-Since: Mon, 12 March
Do not
generate
response304 Not Modified
Cache-Control: maxage=60
200 OK
Cache-Control: maxage=60
Last-Modified: Mon, 12 March
« Hello eZ »
Bob make the same request, 50 seconds after Rick …
Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
•  Gateway Cache, or reverse proxy, is an independent layer that sits in front of your
application (it can be within Symfony or external). The reverse proxy caches
responses as they're returned from your application and answers requests with
cached responses before they hit your application code
•  HTTP cache headers are used to communicate with the gateway cache and any
other caches between your application and the client. Symfony2 provides a
powerful interface for managing the cache headers
•  HTTP expiration and validation are the two models used for determining whether
cached content is fresh (can be reused from the cache) or stale (should be
regenerated by the application)
•  Edge Side Includes (ESI) allow HTTP cache to be used to cache page fragments
(even nested fragments) independently. With ESI, you can f.e. cache an entire
page for 60 minutes, but an embedded sidebar for only 5 minutes
More info: http://symfony.com/doc/current/book/http_cache.html
Reminder: Symfony2 cache I/II
Concepts
SLIDE 46Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
•  eZ Publish uses the Symfony HttpCache to manage content cache, with both expiration and
validation model
•  An ETag is computed for every content/version and sent in the response
•  It is also possible to use the expiration model to get lightning fast responses
Default configuration
ezpublish:
system:
my_siteaccess:
content:
view_cache: true # Activates HttpCache for content
ttl_cache: true # Activates expiration-based HttpCache for content (very fast)
default_ttl: 60 # Number of seconds an Http response is valid in cache (if ttl_cache is true)
•  An additional X-Location-Id header is added in the response for identification
•  The HttpCache is disabled for the dev environment
eZ Publish 5 : HttpCache
Content cache
SLIDE 47Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
•  You can tie the response of a custom controller to a particular Location id
•  It will be cached by default in the Gateway Cache
•  It will be automatically expired when that content is published again
eZ Publish 5 : HttpCache
Making your controller content-cache aware
SLIDE 48Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
use SymfonyComponentHttpFoundationResponse;!
!
// In a controller!
//  "Connects" the response to location #123 and sets a max age (TTL) of 1 hour.!
$response = new Response();!
$response->headers->set( ‘X-Location-Id’, 123 );!
$response->setSharedMaxAge( 3600 );!
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
The PURGE mechanism complements the standard validation+expiration model
•  It is only useful in presence of a Gateway Cache
•  It gives the best of both worlds (large TTL and fresh content)
On publish, one or several Http PURGE requests are sent to the Gateway Cache
This request will have a specific header:
•  X-Location-Id (in the case of 1 request per location to purge), or
•  X-Group-Location-Id (in the case of 1 request for all locations to purge)
Emulated purge request
•  Default mode
•  No Http requests will be sent to an external Gateway Cache when publishing
•  Works with the internal Httpcache
!
ezpublish:
http_cache:
purge_type: local
!
!
eZ Publish 5 : Purge
SLIDE 49Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
•  One purge request per location, aka «MultipleHttp»
purge_type: multiple_http
•  One purge request for all locations, aka «SingleHttp» (X-Group-Location-id header)
purge_type: single_http
NB: needs specific code for varnish to work with (C language plugin)
•  Gateway cache server address
purge_servers: [ "http://varnish.server1/", "http://varnish.server2/" ]
•  Purge all contents
On response, you will have an header like this:
X-location-Id: *
	
  
eZ Publish 5 : Purge
Managing external gateways
SLIDE 50Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
You can expire the content cache for any location you desire
$locationIds = array( 123, 456 );!
$container->get( ‘ezpublish.http_cache.purger’ )->purge( $locationIds );!
!
$container->get( ‘ezpublish.http_cache.purger’ )->purgeAll();!
eZ Publish 5 : Purge
SLIDE 51Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Manual purging
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
To use ESI blocks with a reverse proxy :
•  VirtualHost is pointing on index.php
•  Don’t load EzPublishCache() in index.php (only if you are using a reverse proxy)
=> otherwise Symfony2 will use internal reverse proxy and send to the real reverse
proxy the HTML result of ESI blocks
eZ Publish 5 : ESI support
SLIDE 52Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Varnish Cache
SLIDE 53
Varnish Cache is a web application accelerator also known as a caching HTTP
reverse proxy.
You install it in front of any server that speaks HTTP and configure it to cache the
contents. Varnish Cache is really, really fast. It typically speeds up delivery with a
factor of 300 - 1000x, depending on your architecture.
A high level overview of what Varnish does can be seen in the video attached to
this web page.
https://www.varnish-cache.org/about
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Varnish Cache – How to ?
SLIDE 54
eZ Publish 5.x was tested with last major release of Varnish Cache ( 3.x ).
All informations about installation, configuration are located here:
https://www.varnish-cache.org/docs/3.0/installation/index.html
How to start Varnish ? Two ways:
Manually
varnishd -f /usr/local/etc/varnish/default.vcl -s malloc,1G -T
127.0.0.1:2000 -a 0.0.0.0:8080!
Init Script
About varnish configuration (On Debian/Ubuntu OS):
•  You have to modify your /etc/default/varnish file (configuration used by init.d
script)
For all Operating Systems, modify or create a new vcl file ( /etc/varnish/
default.vcl)
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Varnish - Vcl
SLIDE 55
•  vcl_recv: is the first VCL function executed,
right after Varnish has decoded the request into
its basic data structure
•  vcl_hash: defines what is unique about a
request
•  vcl_hit: right after an object has been found in
the cache
•  vcl_miss: right after an object was looked up
and not found in cache
•  vcl_fetch: is the backend-counterpart to
vcl_recv. Return deliver, tells Varnish to cache,
returning hit_for_pass tells it not to cache, but
does not run the vcl_pass function of VCL for
this specific client.
Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
Varnish VCL and eZ Publish 5
SLIDE 56
A dedicated VCL could be found on confluence
https://confluence.ez.no/display/EZP/Using+Varnish
Be careful: only multiple_http is implemented on this example. If you would like
to switch to single_http, you have to create a Vmod or add some C code.
Some tools to debug with Varnish:
•  varnishlog
•  varnishadm
eZ Publish 5 and Varnish
Exercise

More Related Content

What's hot

Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSConfiguring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSPuppet
 
Zend Core on IBM i - Security Considerations
Zend Core on IBM i - Security ConsiderationsZend Core on IBM i - Security Considerations
Zend Core on IBM i - Security ConsiderationsZendCon
 
Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)Symfoniacs
 
CommandBox REPL, CLI, and Package Manager
CommandBox REPL, CLI, and Package ManagerCommandBox REPL, CLI, and Package Manager
CommandBox REPL, CLI, and Package Managerbdw429s
 
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Gaetano Giunta
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi DevelopmentPaul Fiore
 
The Future of Cloud Computing Today with Ubuntu 10.10
The Future of Cloud Computing Today with Ubuntu 10.10The Future of Cloud Computing Today with Ubuntu 10.10
The Future of Cloud Computing Today with Ubuntu 10.10RightScale
 
Ansible + WordPress
Ansible + WordPressAnsible + WordPress
Ansible + WordPressAlan Lok
 
Create docker image with bluemix dev ops
Create docker image with bluemix dev opsCreate docker image with bluemix dev ops
Create docker image with bluemix dev opsJoseph Chang
 
Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Carsten Ziegeler
 
Concourse CI Meetup Demo
Concourse CI Meetup DemoConcourse CI Meetup Demo
Concourse CI Meetup DemoToshiaki Maki
 
OpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - JesseOpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - JesseJesse Gallagher
 
HCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsHCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsAles Lichtenberg
 
Sleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your ProductSleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your ProductSubramanyam C
 
Connect to blumix vm with vnc
Connect to blumix vm with vncConnect to blumix vm with vnc
Connect to blumix vm with vncJoseph Chang
 
HCL Sametime Meetings 11.5 Step-by-Step
HCL Sametime Meetings 11.5  Step-by-StepHCL Sametime Meetings 11.5  Step-by-Step
HCL Sametime Meetings 11.5 Step-by-StepAles Lichtenberg
 
Install Concourse CI with BOSH
Install Concourse CI with BOSHInstall Concourse CI with BOSH
Install Concourse CI with BOSHToshiaki Maki
 
Modernizing .NET Apps with Docker
Modernizing .NET Apps with DockerModernizing .NET Apps with Docker
Modernizing .NET Apps with DockerDocker
 

What's hot (20)

Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSConfiguring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
 
Zend Core on IBM i - Security Considerations
Zend Core on IBM i - Security ConsiderationsZend Core on IBM i - Security Considerations
Zend Core on IBM i - Security Considerations
 
Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)
 
CommandBox REPL, CLI, and Package Manager
CommandBox REPL, CLI, and Package ManagerCommandBox REPL, CLI, and Package Manager
CommandBox REPL, CLI, and Package Manager
 
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi Development
 
The Future of Cloud Computing Today with Ubuntu 10.10
The Future of Cloud Computing Today with Ubuntu 10.10The Future of Cloud Computing Today with Ubuntu 10.10
The Future of Cloud Computing Today with Ubuntu 10.10
 
Xen summit amd_2010v3
Xen summit amd_2010v3Xen summit amd_2010v3
Xen summit amd_2010v3
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Ansible + WordPress
Ansible + WordPressAnsible + WordPress
Ansible + WordPress
 
Create docker image with bluemix dev ops
Create docker image with bluemix dev opsCreate docker image with bluemix dev ops
Create docker image with bluemix dev ops
 
Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)
 
Concourse CI Meetup Demo
Concourse CI Meetup DemoConcourse CI Meetup Demo
Concourse CI Meetup Demo
 
OpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - JesseOpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - Jesse
 
HCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsHCL Sametime V11 installation - tips
HCL Sametime V11 installation - tips
 
Sleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your ProductSleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your Product
 
Connect to blumix vm with vnc
Connect to blumix vm with vncConnect to blumix vm with vnc
Connect to blumix vm with vnc
 
HCL Sametime Meetings 11.5 Step-by-Step
HCL Sametime Meetings 11.5  Step-by-StepHCL Sametime Meetings 11.5  Step-by-Step
HCL Sametime Meetings 11.5 Step-by-Step
 
Install Concourse CI with BOSH
Install Concourse CI with BOSHInstall Concourse CI with BOSH
Install Concourse CI with BOSH
 
Modernizing .NET Apps with Docker
Modernizing .NET Apps with DockerModernizing .NET Apps with Docker
Modernizing .NET Apps with Docker
 

Similar to eZ UnConference#2 - eZ Publish 5 basics Philippe Vincent-Royol & Florent Huck

Red Hat for IBM System z IBM Enterprise2014 Las Vegas
Red Hat for IBM System z IBM Enterprise2014 Las Vegas Red Hat for IBM System z IBM Enterprise2014 Las Vegas
Red Hat for IBM System z IBM Enterprise2014 Las Vegas Filipe Miranda
 
Ny symfony meetup may 2015
Ny symfony meetup may 2015Ny symfony meetup may 2015
Ny symfony meetup may 2015Roland Benedetti
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi Shlomo Vanunu
 
Adam Bien at GlassFish Community Event, JavaOne 2011
Adam Bien at GlassFish Community Event, JavaOne 2011Adam Bien at GlassFish Community Event, JavaOne 2011
Adam Bien at GlassFish Community Event, JavaOne 2011Arun Gupta
 
Introduction to eZ Publish Platform 5.3, the Ventoux release, public webinar
Introduction to eZ Publish Platform 5.3, the Ventoux release, public webinarIntroduction to eZ Publish Platform 5.3, the Ventoux release, public webinar
Introduction to eZ Publish Platform 5.3, the Ventoux release, public webinarRoland Benedetti
 
Linux field-update-2015
Linux field-update-2015Linux field-update-2015
Linux field-update-2015Chris Simmonds
 
eZ Publish Norwegian Public User Group
eZ Publish Norwegian Public User GroupeZ Publish Norwegian Public User Group
eZ Publish Norwegian Public User GroupRoland Benedetti
 
Install Redis on Oracle Linux
Install Redis on Oracle LinuxInstall Redis on Oracle Linux
Install Redis on Oracle LinuxJohan Louwers
 
Migrate Oracle WebLogic Applications onto a Containerized Cloud Data Center
Migrate Oracle WebLogic Applications onto a Containerized Cloud Data CenterMigrate Oracle WebLogic Applications onto a Containerized Cloud Data Center
Migrate Oracle WebLogic Applications onto a Containerized Cloud Data CenterJingnan Zhou
 
Top 10 dev ops tools (1)
Top 10 dev ops tools (1)Top 10 dev ops tools (1)
Top 10 dev ops tools (1)yalini97
 
Webinar: Open Source on the Modern Mainframe
Webinar: Open Source on the Modern MainframeWebinar: Open Source on the Modern Mainframe
Webinar: Open Source on the Modern MainframeOpen Mainframe Project
 
Weave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any KubernetesWeave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any KubernetesWeaveworks
 
Migrating extensions to eZ Publish 5
Migrating extensions to eZ Publish 5Migrating extensions to eZ Publish 5
Migrating extensions to eZ Publish 5lserwatka
 
Application Virtualization overview - BayCUG
Application Virtualization overview - BayCUGApplication Virtualization overview - BayCUG
Application Virtualization overview - BayCUGDenis Gundarev
 
Red Hat for IBM System z Update v5
Red Hat for IBM System z Update v5Red Hat for IBM System z Update v5
Red Hat for IBM System z Update v5Filipe Miranda
 
Extending ZF & Extending With ZF
Extending ZF & Extending With ZFExtending ZF & Extending With ZF
Extending ZF & Extending With ZFRalph Schindler
 

Similar to eZ UnConference#2 - eZ Publish 5 basics Philippe Vincent-Royol & Florent Huck (20)

Red Hat for IBM System z IBM Enterprise2014 Las Vegas
Red Hat for IBM System z IBM Enterprise2014 Las Vegas Red Hat for IBM System z IBM Enterprise2014 Las Vegas
Red Hat for IBM System z IBM Enterprise2014 Las Vegas
 
Ny symfony meetup may 2015
Ny symfony meetup may 2015Ny symfony meetup may 2015
Ny symfony meetup may 2015
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi
 
Adam Bien at GlassFish Community Event, JavaOne 2011
Adam Bien at GlassFish Community Event, JavaOne 2011Adam Bien at GlassFish Community Event, JavaOne 2011
Adam Bien at GlassFish Community Event, JavaOne 2011
 
Introduction to eZ Publish Platform 5.3, the Ventoux release, public webinar
Introduction to eZ Publish Platform 5.3, the Ventoux release, public webinarIntroduction to eZ Publish Platform 5.3, the Ventoux release, public webinar
Introduction to eZ Publish Platform 5.3, the Ventoux release, public webinar
 
Linux field-update-2015
Linux field-update-2015Linux field-update-2015
Linux field-update-2015
 
eZ Publish Norwegian Public User Group
eZ Publish Norwegian Public User GroupeZ Publish Norwegian Public User Group
eZ Publish Norwegian Public User Group
 
eZ Publish 5 in depth inspection
eZ Publish 5 in depth inspectioneZ Publish 5 in depth inspection
eZ Publish 5 in depth inspection
 
Install Redis on Oracle Linux
Install Redis on Oracle LinuxInstall Redis on Oracle Linux
Install Redis on Oracle Linux
 
Deploying PHP apps on the cloud
Deploying PHP apps on the cloudDeploying PHP apps on the cloud
Deploying PHP apps on the cloud
 
Migrate Oracle WebLogic Applications onto a Containerized Cloud Data Center
Migrate Oracle WebLogic Applications onto a Containerized Cloud Data CenterMigrate Oracle WebLogic Applications onto a Containerized Cloud Data Center
Migrate Oracle WebLogic Applications onto a Containerized Cloud Data Center
 
Top 10 dev ops tools (1)
Top 10 dev ops tools (1)Top 10 dev ops tools (1)
Top 10 dev ops tools (1)
 
Webinar: Open Source on the Modern Mainframe
Webinar: Open Source on the Modern MainframeWebinar: Open Source on the Modern Mainframe
Webinar: Open Source on the Modern Mainframe
 
Weave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any KubernetesWeave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any Kubernetes
 
Migrating extensions to eZ Publish 5
Migrating extensions to eZ Publish 5Migrating extensions to eZ Publish 5
Migrating extensions to eZ Publish 5
 
Application Virtualization overview - BayCUG
Application Virtualization overview - BayCUGApplication Virtualization overview - BayCUG
Application Virtualization overview - BayCUG
 
green
greengreen
green
 
Dedicated embedded linux af Esben Haabendal, Prevas A/S
Dedicated embedded linux af Esben Haabendal, Prevas A/SDedicated embedded linux af Esben Haabendal, Prevas A/S
Dedicated embedded linux af Esben Haabendal, Prevas A/S
 
Red Hat for IBM System z Update v5
Red Hat for IBM System z Update v5Red Hat for IBM System z Update v5
Red Hat for IBM System z Update v5
 
Extending ZF & Extending With ZF
Extending ZF & Extending With ZFExtending ZF & Extending With ZF
Extending ZF & Extending With ZF
 

More from eZ Publish Community

5 idées pour transformer votre contenu en business
5 idées pour transformer votre contenu en business5 idées pour transformer votre contenu en business
5 idées pour transformer votre contenu en businesseZ Publish Community
 
eZ Publish Plateform 5.2 Webinar Deutsch
eZ Publish Plateform 5.2 Webinar Deutsch eZ Publish Plateform 5.2 Webinar Deutsch
eZ Publish Plateform 5.2 Webinar Deutsch eZ Publish Community
 
eZ Unconference#2 - Future of the internet 2020 - C. Zahneissen (cpo)
eZ Unconference#2 - Future of the internet 2020 - C. Zahneissen (cpo)eZ Unconference#2 - Future of the internet 2020 - C. Zahneissen (cpo)
eZ Unconference#2 - Future of the internet 2020 - C. Zahneissen (cpo)eZ Publish Community
 
eZ Unconference#2 - Keynote - A. Farstad (CEO)
eZ Unconference#2 - Keynote - A. Farstad (CEO)eZ Unconference#2 - Keynote - A. Farstad (CEO)
eZ Unconference#2 - Keynote - A. Farstad (CEO)eZ Publish Community
 
2013.04.23 eZ Sessions 6 - Migrating legacy eZ Publish extensions - Lukasz Se...
2013.04.23 eZ Sessions 6 - Migrating legacy eZ Publish extensions - Lukasz Se...2013.04.23 eZ Sessions 6 - Migrating legacy eZ Publish extensions - Lukasz Se...
2013.04.23 eZ Sessions 6 - Migrating legacy eZ Publish extensions - Lukasz Se...eZ Publish Community
 
How is the 5.x data model going to compare to 4.x (+no sql )
How is the 5.x data model going to compare  to 4.x (+no sql )How is the 5.x data model going to compare  to 4.x (+no sql )
How is the 5.x data model going to compare to 4.x (+no sql )eZ Publish Community
 
Handling transition between 4.x and 5.x.
Handling transition between 4.x and 5.x.Handling transition between 4.x and 5.x.
Handling transition between 4.x and 5.x.eZ Publish Community
 
E z publish 5 template syntax (twig),
E z publish 5 template syntax (twig),E z publish 5 template syntax (twig),
E z publish 5 template syntax (twig),eZ Publish Community
 
2012 10-17 un conference ez publish cloud presentation
2012 10-17 un conference ez publish cloud presentation2012 10-17 un conference ez publish cloud presentation
2012 10-17 un conference ez publish cloud presentationeZ Publish Community
 
Mugo - Approval Workflow extension for eZ Publish - eZ Day Paris - Oct 14th 2011
Mugo - Approval Workflow extension for eZ Publish - eZ Day Paris - Oct 14th 2011Mugo - Approval Workflow extension for eZ Publish - eZ Day Paris - Oct 14th 2011
Mugo - Approval Workflow extension for eZ Publish - eZ Day Paris - Oct 14th 2011eZ Publish Community
 
Tony Wood - Keynote Vision with Technology
Tony Wood - Keynote Vision with TechnologyTony Wood - Keynote Vision with Technology
Tony Wood - Keynote Vision with TechnologyeZ Publish Community
 
Simon Wan - Keynote - The Web Strategy of the Wall Street Journal in Asia
Simon Wan - Keynote - The Web Strategy of the Wall Street Journal in AsiaSimon Wan - Keynote - The Web Strategy of the Wall Street Journal in Asia
Simon Wan - Keynote - The Web Strategy of the Wall Street Journal in AsiaeZ Publish Community
 
Mark Marsiglio - Autoscaling with eZ in the Cloud - A Case Study
Mark Marsiglio - Autoscaling with eZ in the Cloud - A Case StudyMark Marsiglio - Autoscaling with eZ in the Cloud - A Case Study
Mark Marsiglio - Autoscaling with eZ in the Cloud - A Case StudyeZ Publish Community
 
Marianne Otterdahl Møller - Multinational and multichannel market communication
Marianne Otterdahl Møller - Multinational and multichannel market communicationMarianne Otterdahl Møller - Multinational and multichannel market communication
Marianne Otterdahl Møller - Multinational and multichannel market communicationeZ Publish Community
 
Gabriele Viebach - Keynote eZ Conference
Gabriele Viebach - Keynote eZ ConferenceGabriele Viebach - Keynote eZ Conference
Gabriele Viebach - Keynote eZ ConferenceeZ Publish Community
 

More from eZ Publish Community (20)

5 idées pour transformer votre contenu en business
5 idées pour transformer votre contenu en business5 idées pour transformer votre contenu en business
5 idées pour transformer votre contenu en business
 
eZ Publish Plateform 5.2 Webinar Deutsch
eZ Publish Plateform 5.2 Webinar Deutsch eZ Publish Plateform 5.2 Webinar Deutsch
eZ Publish Plateform 5.2 Webinar Deutsch
 
eZ Unconference#2 - Future of the internet 2020 - C. Zahneissen (cpo)
eZ Unconference#2 - Future of the internet 2020 - C. Zahneissen (cpo)eZ Unconference#2 - Future of the internet 2020 - C. Zahneissen (cpo)
eZ Unconference#2 - Future of the internet 2020 - C. Zahneissen (cpo)
 
eZ Unconference#2 - Keynote - A. Farstad (CEO)
eZ Unconference#2 - Keynote - A. Farstad (CEO)eZ Unconference#2 - Keynote - A. Farstad (CEO)
eZ Unconference#2 - Keynote - A. Farstad (CEO)
 
2013.04.23 eZ Sessions 6 - Migrating legacy eZ Publish extensions - Lukasz Se...
2013.04.23 eZ Sessions 6 - Migrating legacy eZ Publish extensions - Lukasz Se...2013.04.23 eZ Sessions 6 - Migrating legacy eZ Publish extensions - Lukasz Se...
2013.04.23 eZ Sessions 6 - Migrating legacy eZ Publish extensions - Lukasz Se...
 
Cxm mobile stig martin fiska
Cxm mobile   stig martin fiskaCxm mobile   stig martin fiska
Cxm mobile stig martin fiska
 
App factory igor vrdoljak
App factory   igor vrdoljakApp factory   igor vrdoljak
App factory igor vrdoljak
 
The administration interface
The administration interfaceThe administration interface
The administration interface
 
How is the 5.x data model going to compare to 4.x (+no sql )
How is the 5.x data model going to compare  to 4.x (+no sql )How is the 5.x data model going to compare  to 4.x (+no sql )
How is the 5.x data model going to compare to 4.x (+no sql )
 
Handling transition between 4.x and 5.x.
Handling transition between 4.x and 5.x.Handling transition between 4.x and 5.x.
Handling transition between 4.x and 5.x.
 
E z publish 5 template syntax (twig),
E z publish 5 template syntax (twig),E z publish 5 template syntax (twig),
E z publish 5 template syntax (twig),
 
2012 10-17 un conference ez publish cloud presentation
2012 10-17 un conference ez publish cloud presentation2012 10-17 un conference ez publish cloud presentation
2012 10-17 un conference ez publish cloud presentation
 
Mugo - Approval Workflow extension for eZ Publish - eZ Day Paris - Oct 14th 2011
Mugo - Approval Workflow extension for eZ Publish - eZ Day Paris - Oct 14th 2011Mugo - Approval Workflow extension for eZ Publish - eZ Day Paris - Oct 14th 2011
Mugo - Approval Workflow extension for eZ Publish - eZ Day Paris - Oct 14th 2011
 
Tony Wood - Keynote Vision with Technology
Tony Wood - Keynote Vision with TechnologyTony Wood - Keynote Vision with Technology
Tony Wood - Keynote Vision with Technology
 
Simon Wan - Keynote - The Web Strategy of the Wall Street Journal in Asia
Simon Wan - Keynote - The Web Strategy of the Wall Street Journal in AsiaSimon Wan - Keynote - The Web Strategy of the Wall Street Journal in Asia
Simon Wan - Keynote - The Web Strategy of the Wall Street Journal in Asia
 
Maxime Thomas - eZBK
Maxime Thomas - eZBKMaxime Thomas - eZBK
Maxime Thomas - eZBK
 
Mark Marsiglio - Autoscaling with eZ in the Cloud - A Case Study
Mark Marsiglio - Autoscaling with eZ in the Cloud - A Case StudyMark Marsiglio - Autoscaling with eZ in the Cloud - A Case Study
Mark Marsiglio - Autoscaling with eZ in the Cloud - A Case Study
 
Marianne Otterdahl Møller - Multinational and multichannel market communication
Marianne Otterdahl Møller - Multinational and multichannel market communicationMarianne Otterdahl Møller - Multinational and multichannel market communication
Marianne Otterdahl Møller - Multinational and multichannel market communication
 
Gabriele Viebach - Keynote eZ Conference
Gabriele Viebach - Keynote eZ ConferenceGabriele Viebach - Keynote eZ Conference
Gabriele Viebach - Keynote eZ Conference
 
Mark Pilipczuk - Neustar Journey
Mark Pilipczuk - Neustar JourneyMark Pilipczuk - Neustar Journey
Mark Pilipczuk - Neustar Journey
 

Recently uploaded

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

eZ UnConference#2 - eZ Publish 5 basics Philippe Vincent-Royol & Florent Huck

  • 1. eZ Unconf #2 eZ Publish 5.1 Introduction Florent Huck – florent.huck@ez.no Philippe Vincent-Royol – philippe.vincent-royol@ez.no
  • 2. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol SLIDE  2   •  Welcome to eZ Publish •  Dual Core •  What's change between eZ 4, 5.0, 5.1 ? •  That's one small step for a developper ... •  Bundle eZ 5 full stack •  Multisite with one repository •  Templates override •  Deeper in source code •  ... one giant leap for production ! •  Cache introduction •  Http Cache •  Varnish configuration 2 Agenda Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
  • 3. Welcome to eZ Publish 3
  • 4. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol •  Simple Integration with our API •  HMVC (Hierarchical Model View Controller) stack •  Decoupled Composents •  Dependency Injection •  New Template Engine •  Extensible, Open, Reliable •  Backward Compatibility SLIDE 4 eZ Publish 5 – Wall of Fame Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
  • 5. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol SLIDE 5 eZ Publish 5 - Architecture Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
  • 6. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol SLIDE 6 eZ Publish Public API For the first time ever, a Public API for eZ Publish: a major step forward! •  All the CMS features available from PHP code • easier to develop import/export scripts • easier to add new content mgmt interfaces •  A clear API definition, which means better documentation for developers •  Allows refactoring of core code for improved performance, scalability, etc… while having •  long term backward compatibility of your custom developments •  Fully extensible, extend it with your custom features relying on the same framework Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
  • 7. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol SLIDE 7 eZ Publish Rest API v. 2 With version 5, eZ Publish REST API covers the whole scope of the content management engine and not only a limited part (read only) The REST API fully relies now on the Public API for better maintainability and simplicity It is the reliable and maintainable for: •  Native mobile applications •  Integration in existing business applications •  Social Media Integrations •  Any other application (desktop application, internet TV apps…) Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
  • 8. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol SLIDE 8 Handle big data content repositories •  A clear goal to provide Relational, NoSQL and Hybrid storage system •  A persistence API enabling (eZ or 3rd party) to develop the support of any storage system •  Long term backward compatibility of your custom developments •  Bridging eZ Publish 4.x storage system for backward compatibility with legacy » eZ Publish 5 is the first content management platform designed to handle Big Content & Big Data! Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
  • 9. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol A whole new framework available for developers •  Extensible HMVC structure •  Clean and maintainable modularity via native dependency injection •  Easier to merge your custom apps with eZ Publish •  A wide range of existing resources on top of Symfony Benefits & Opportunities SLIDE 9 Symfony2, a new Web framework for eZ Publish » eZ Publish 5 integrates the Symfony 2 framework. What does this mean? Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol A new template engine: Twig •  Enhanced rendering speed •  Easier and more extensible templating language •  Support of hierarchical requests •  Better IDE support
  • 10. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Advantages •  Knowledgeable Community •  Standardization • Time saving • Re-usability of code • Re-usability of knowledge •  Reduced maintenance costs at the component level •  Faster introduction of new features •  Faster development of items such as alternate database options •  Faster and more efficient kernel Advantages & Disaventages SLIDE 10 Symfony2, a new Web framework for eZ Publish Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Disavantages •  New development APIs to learn •  Porting of legacy code •  Transition period •  No more excuses not to do your work
  • 11. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol SLIDE 11 What’s change ? Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol eZ Publish Evolution
  • 12. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Legacy system : is an old method, technology, computer system, or application program. The legacy system may or may not remain in use. Even if it is no longer used, it may continue to impact the organization due to its historical role. (Wikipedia) Changes •  Online resources •  File structure •  API •  Terminology •  Feature implementation SLIDE 12 What Changes? Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
  • 13. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol /ez5 ezpublish configurations, cache, logs ezpublish_legacy the full Legacy Stack … incl. legacy extensions src your bundles vendor libraries from 3rd parties ezystems Kernel and 3 bundles (core, legacy, rest) web all files which are accessible from the web •  Static assets are either copied or symlinked from legacy designs / extensions into the web directory via a cli script •  Different rewrite rules are needed •  Per-environment configuration is managed via different frontend controllers in the web directory SLIDE 13 File structure Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol
  • 14. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Translation 4.x to 5.x – content model SLIDE 14 Terminology Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol 4.x   5.X   Content  Class   ContentType   Content  Class  Group   ContentTypeGroup   Datatype   FieldType   Node   Loca7on   Content  Object   Content  (meta  info  in  ContentInfo)   Content  Object  Version   VersionInfo   Content  Object  ABribute   Field  +  FieldValue   Content  Class  ABribute   FieldDefini7on  
  • 15. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Translation 4.x to 5.x – feature implementation SLIDE 15 Features 4.x   5.X   eZ  Publish  Template   Twig  Template   Extension   Bundle   Module   Controller  class  (based  on  eZBundleEzPublishCoreBundle Controller)   View   Controller  ac7on   Fetch  func7on   Replaced  by  controller+view,  the  template  "fetch"  func7on  is   replaced  by  "render"   Template  operator   Filter  +  func7on   seTngs/   ezpublish/config  and  Resources/config  on  each  bundles   site.ini   ezpublish.yml  
  • 16. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol As of 5.0, some features are not implemented on the new stack, such as: •  Admin Interface; content editing •  Cluster Mode (works now with eZ 5.1+) •  Information Collectors •  Workflows •  Notifications •  eZ Find •  eZ Flow (display of «layout» attribute) (5.1+ includes read part) •  Multisite with a repository (works now with eZ 5.1+) Documentation is an effort under way. You can participate too! Feature translation 4.x to 5.x – all the rest SLIDE 16 What Changes
  • 17. •  Issue Tracker: http://jira.ez.no •  Developer documentation: https://confluence.ez.no/display/EZP/eZ+Publish+Documentation •  API docs: •  http://ezsystems.github.com/ezpublish-kernel/phpDocumentor/ •  http://pubsvn.ez.no/ •  Also the doc folder inside vendor/ezsystems/ezpublish •  Source code: •  https://github.com/ezsystems/ezpublish-legacy => the 4.x code, a.k.a. Legacy Stack •  https://github.com/ezsystems/ezpublish-kernel => the new kernel (incl. Public API) •  https://github.com/ezsystems/ezpublish-community => pulling it all together •  Tutorials: http://share.ez.no as always •  eZ 5 CheatSheet https://github.com/dspe/ez5_cheatsheet Online resources Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved. SLIDE 17
  • 18. That's one small step for a developper ... 18
  • 19. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol eZ Publish 5 – Development mode SLIDE 19 •  Activated via a custom controller in the new kernel •  Debug toolbar at bottom of the screen – always in view •  Full featured profiler •  Saves data of every profiler run •  Exception handling gets stricter •  Easier to keep separate settings per-environment •  DebugOutput still available when running legacy modules More customizable in 5.2+ and 2013.5. Have a look at https://github.com/ezsystems/ezpublish-community/pull/51
  • 20. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol eZ Publish 5 configuration model SLIDE 20 The eZ 5’s configuration model uses Symfony2’s configuration model : YML files A YML file contains settings that control behavior of a specific part of eZ Publish •  ezpublish.yml is the most important YML file •  config.yml to configure some behavior with Symfony2 for example •  Etc … Settings are managed manually (by editing the YML file with a text editor)
  • 21. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol eZ Publish Dynamic Configuration SLIDE 21 Dynamic configuration with the ConfigResolver can be resolved depending on a scope. Available scopes are (in order of precedence) •  Global:        ezseTngs.global.field_templates   •  Siteaccess:      ezseTngs.ezdemo_site.field_templates   •  Group:        ezseTngs.my_siteaccess_group.field_templates   •  Default:        ezseTngs.default.field_templates   Your dynamic settings must comply internally to the following name format: <namespace>.<scope>.parameter.name  
  • 22. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Dynamic configuration example SLIDE 22 1.  eZ Publish app configuration - YML configuration : ezpublish.yml ezpublish:          system:                  ezspace:                            field_templates:                                      -­‐  {  template:  EztTrainingBundle:FieldType:content_fields.html.twig,  priority:  0  }   2.  Bundle configuration - Syntactic configuration : parameters.yml parameters:          ezseTngs.ezspace.field_templates  :                  -­‐  {  template:  EztTrainingBundle:FieldType:content_fields.html.twig,  priority:  0  }  
  • 23. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol eZ Publish 5 – BC SLIDE 23
  • 24. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Fallback Routing & Content view SLIDE 24 •  All URIs wich are not matched by Symfony controllers are sent to the Legacy Stack •  All existing functionality is thus preserved •  Including custom modules •  Including url-aliases •  For speed, this can be optimized via configuration (f.e. for Admin Interface) •  Sf controller in use: LegacyKernelController::indexAction •  Content is rendered using the ViewController ::viewLocation controller •  Class located in CoreMVCSymfonyControllerContent •  It uses a twig template for pagelayout: pagelayout.html.twig in DemoBundle (set in parameters.yml) •  And a ViewManager to find the appropriate template for the current Location. We will use the template selection rules.
  • 25. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Legacy template fallback SLIDE 25 When falling back to the legacy kernel, the old content/view module is run to return the appropriate view for the given content. However, the pagelayout is not rendered as it needs to be still rendered by Twig in the Symfony part, for consistency. In this regard, the system uses the Decorator design pattern to include the generated view in your layout. parameters:          #  Base  layout  for  legacy  fallback          ezpublish_legacy.my_siteaccess.view_default_layout:  AcmeDemoBundle::pagelayout.html.twig            #  Block  name          ezpublish.content_view.content_block_name:  content            #  Module  Layout          ezpublish_legacy.my_siteaccess.module_default_layout:  AcmeDemoBundle::pagelayout_legacy.html.twig  
  • 26. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Pagelayout example SLIDE 26 Example  of  pagelayout.html.twig     <!DOCTYPE  html>   <html>          <head>                  <!-­‐-­‐  Insert  everything  you  need  here  that  is  common  -­‐-­‐>          </head>          <body>                  {%  block  content  %}{#  Regular  content  will  be  inserted  here  #}{%  endblock  %}          </body>   </html>       Example  of  pagelayout_legacy.html.twig     {%  extends  "AcmeDemoBundle::pagelayout.html.twig"  %}       {%  block  content  %}          {#  module_result  variable  is  received  from  the  legacy  controller.  #}          {{  module_result.content|raw  }}   {%  endblock  %}  
  • 27. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Some usefull tools SLIDE 27 •  Display  a  locaFon   {{  render(  controller("ez_content:viewLoca7on",  {  "loca7onId":  123,  "viewType":  "full"  }    ))  }}   •  Display  a  field   {{  ez_render_field(  content,  "my_field"  )  }}   •  Include  a  legacy  template   {%  include  "design:my_folder/my_template.tpl"  with  {"my_key"  :  "my_value"  }  %}    
  • 28. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Some usefull twig helper SLIDE 28 Property   DescripFon   ezpublish.siteaccess   Returns  the  current  siteaccess   ezpublish.requestUriString   Returns  the  request  URI  string   ezpublish.systemUriString   Return  the  systems  URI  string   ezpublish.viewParameters   Return  the  view  parameters  as  a  hash   ezpublish.viewParametersString   Return  the  view  parameters  as  a  string   ezpublish.siteName   Return  the  name  of  the  current  siteaccess   ezpublish.legacy   Returns  legacy  informa7on   Property   DescripFon   ezpublish.legacy.all   Return  all  parameters   ezpublish.legacy.keys   Returns  the  parameter  keys  only   ezpublish.legacy.get   Returns  a  parameter  by  name   ezpublish.legacy.has   Returns  true  if  the  parameter  is  defined   Legacy
  • 29. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Template selection rules system Simplified view SLIDE 29 Of course, eZ Publish is a (little) bit more complex but you could remember that "Override" template Do  we  provide  an  template   selec7on  rules?   (override.ini  /  ezpublish.yml)   Default template default template (example.tpl / example.html.twig)
  • 30. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Template selection rules - Configuration SLIDE 30 ezpublish:! system:! my_siteaccess:! location_view:! full:! welcome_page:! template: AcmeDemoBundle:full:welcome.html.twig! match:! IdLocation: 2! article_full:! ! ! ! ! ! template: AcmeDemoBundle:full:article.html.twig! ! ! ! ! ! match:! ! ! ! ! ! ! IdentifierContentType: article! preview:! article_preview:! template: AcmeDemoBundle:preview:article.html.twig! match:! IdentifierContentType: [article, news]! Example from ezpublish.yml location_view and content_view are available in override system
  • 31. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Multisite – One repository SLIDE 31 eZ Publish 5.1 provide a way to build multiple website with a single repository, in different subtrees of content. This system will be extends on next releases. ezpublish:! system:! my_siteaccess:! content:! tree_root:! # Root locationId. Default is top locationId! location_id: 123! # Every URL aliases starting with those prefixes will be ! ! ! ! # considered being outside of the subtree starting at! ! ! ! ! # root_location.! # Default value is an empty array.! # Prefixes are not case sensitive.! excluded_uri_prefixes:! - media! - users!
  • 33. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Coding Standard SLIDE 33 When contributing code to eZ Publish, you must follow its coding standards. Remember that the main advantage of standards is that every piece of code looks and feels familiar, it’s not about this or that being more readable. •  Use PHP Code Sniffer ! •  Install eZ v2 PHPCodeSniffer standard (http://github.com/ezsystems/ezcs) https://github.com/ezsystems/ezpublish-kernel/wiki/codingstandards Be awesome, use coding standards
  • 34. Installation & our first bundle ! Exercise
  • 35. ... one giant leap for production ! 35
  • 36. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol The goal of caching in HTTP/1.1 is to eliminate the need to send requests in many cases, and to eliminate the need to send full responses in many other cases Types of caches •  Browser caches: the browser cache is a private cache as cached resources aren't shared with anyone else •  Proxy caches: a proxy is a shared cache as many people can be behind a single one •  Gateway caches: (a.k.a. Reverse Proxy) like a proxy, it's also a shared cache but on the server side More informations about HTTP Rfc: http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-21 Cache - Reminder Cache me if you can ! SLIDE 36Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 37. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol HTTP 1.1 specifies multiple response cache headers that can be used to control caching behavior: •  Cache-Control => can control public/private as well as TTL •  Expires, Max-age => sets a TTL for the given resource •  Etag => used to revalidate a resource which is already in a cache (note: E-tag is removed on eZ 5.1) •  Last-Modified => used to calculate a default TTL if no expiration date is set or as weak validator Side note: compression of content is also a good idea to make web pages load faster •  But take care about gateway caches having to store N versions of each resource Reminder: HTTP caching Caching headers SLIDE 37Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 38. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Two caching models are available: •  Validation •  the client always checks if the resource it has in its cache is valid (1 network roundtrip) •  It gets back a “fast” answer (HTTP 304 with no body) if resource dis not change: good •  Expiration •  Along with the 1st response, the server sends to the client a TTL •  As long as the TTL is not expired, the client does not request the resource again •  This saves one network roundtrip per resource: better •  But it makes it hard to have a TTL if resources can change on random schedule •  Workaround: use different URL for each version of resource (e.g. ezjscore, content images) •  If there is a gateway cache, a PURGE command can be used to overcome this, forcing a refresh of the resource before the TTL is expired Reminder: HTTP caching Validation vs. Expiration SLIDE 38Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 39. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Expiration Model 1/2 SLIDE 39 Including either or both of the Cache-Control: max-age=N or Expires headers Rick Rick Cache Cache Backend Backend Get /welcome Get /welcome « Hello eZ » With max age header 200 OK Cache-Control: maxAge=60 « Hello eZ »200 OK Cache-Control: maxAge=60 « Hello eZ » Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 40. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Expiration Model 2/2 SLIDE 40 Including either or both of the Cache-Control: max-age=N or Expires headers Bob Bob Cache Cache Backend Backend Get /welcome This does not happen … 200 OK Age = 40 Cache-Control: maxAge=60 « Hello eZ » … because the cache is fresh Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 41. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Validation Model 1/2 SLIDE 41 Rick Rick Cache Cache Backend Backend Get /welcome Get /welcome « Hello eZ » 200 OK Last Modified: Mon, 12 March ETag: a3f5gg6d « Hello eZ » 200 OK Last Modified: Mon, 12 March ETag: a3f5gg6d « Hello eZ » Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 42. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Validation Model 2/2 SLIDE 42 Bob Bob Cache Cache Backend Backend Get /welcome Get /welcome If-Modified-Since: Mon, 12 March If-Node-Match: a3f5gg6d Do not generate response 304 Not Modified 200 OK Last Modified: Mon, 12 March ETag: a3f5gg6d « Hello eZ » Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 43. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Combining Expiration & Validation models 1/3 SLIDE 43 Rick Rick Cache Cache Backend Backend Get /welcome Get /welcome « Hello eZ » 200 OK Cache-control : maxage=60 Last-Modified: Mon, 12 March « Hello eZ » 200 OK Cache-control : maxage=60 Last-Modified: Mon, 12 March « Hello eZ » Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 44. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Combining Expiration & Validation models 2/3 SLIDE 44 Rick Rick Cache Cache Backend Backend Get /welcome This does not happen … … because the cache is fresh 200 OK Cache-control : maxage=60 Age: 40 Last-Modified: Mon, 12 March « Hello eZ » Rick comes back after 40s … Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 45. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Combining Expiration & Validation models 3/3 SLIDE 45 Bob Bob Cache Cache Backend Backend Get /welcome Get /welcome If-Modified-Since: Mon, 12 March Do not generate response304 Not Modified Cache-Control: maxage=60 200 OK Cache-Control: maxage=60 Last-Modified: Mon, 12 March « Hello eZ » Bob make the same request, 50 seconds after Rick … Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 46. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol •  Gateway Cache, or reverse proxy, is an independent layer that sits in front of your application (it can be within Symfony or external). The reverse proxy caches responses as they're returned from your application and answers requests with cached responses before they hit your application code •  HTTP cache headers are used to communicate with the gateway cache and any other caches between your application and the client. Symfony2 provides a powerful interface for managing the cache headers •  HTTP expiration and validation are the two models used for determining whether cached content is fresh (can be reused from the cache) or stale (should be regenerated by the application) •  Edge Side Includes (ESI) allow HTTP cache to be used to cache page fragments (even nested fragments) independently. With ESI, you can f.e. cache an entire page for 60 minutes, but an embedded sidebar for only 5 minutes More info: http://symfony.com/doc/current/book/http_cache.html Reminder: Symfony2 cache I/II Concepts SLIDE 46Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 47. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol •  eZ Publish uses the Symfony HttpCache to manage content cache, with both expiration and validation model •  An ETag is computed for every content/version and sent in the response •  It is also possible to use the expiration model to get lightning fast responses Default configuration ezpublish: system: my_siteaccess: content: view_cache: true # Activates HttpCache for content ttl_cache: true # Activates expiration-based HttpCache for content (very fast) default_ttl: 60 # Number of seconds an Http response is valid in cache (if ttl_cache is true) •  An additional X-Location-Id header is added in the response for identification •  The HttpCache is disabled for the dev environment eZ Publish 5 : HttpCache Content cache SLIDE 47Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 48. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol •  You can tie the response of a custom controller to a particular Location id •  It will be cached by default in the Gateway Cache •  It will be automatically expired when that content is published again eZ Publish 5 : HttpCache Making your controller content-cache aware SLIDE 48Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved. use SymfonyComponentHttpFoundationResponse;! ! // In a controller! //  "Connects" the response to location #123 and sets a max age (TTL) of 1 hour.! $response = new Response();! $response->headers->set( ‘X-Location-Id’, 123 );! $response->setSharedMaxAge( 3600 );!
  • 49. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol The PURGE mechanism complements the standard validation+expiration model •  It is only useful in presence of a Gateway Cache •  It gives the best of both worlds (large TTL and fresh content) On publish, one or several Http PURGE requests are sent to the Gateway Cache This request will have a specific header: •  X-Location-Id (in the case of 1 request per location to purge), or •  X-Group-Location-Id (in the case of 1 request for all locations to purge) Emulated purge request •  Default mode •  No Http requests will be sent to an external Gateway Cache when publishing •  Works with the internal Httpcache ! ezpublish: http_cache: purge_type: local ! ! eZ Publish 5 : Purge SLIDE 49Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 50. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol •  One purge request per location, aka «MultipleHttp» purge_type: multiple_http •  One purge request for all locations, aka «SingleHttp» (X-Group-Location-id header) purge_type: single_http NB: needs specific code for varnish to work with (C language plugin) •  Gateway cache server address purge_servers: [ "http://varnish.server1/", "http://varnish.server2/" ] •  Purge all contents On response, you will have an header like this: X-location-Id: *   eZ Publish 5 : Purge Managing external gateways SLIDE 50Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 51. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol You can expire the content cache for any location you desire $locationIds = array( 123, 456 );! $container->get( ‘ezpublish.http_cache.purger’ )->purge( $locationIds );! ! $container->get( ‘ezpublish.http_cache.purger’ )->purgeAll();! eZ Publish 5 : Purge SLIDE 51Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved. Manual purging
  • 52. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol To use ESI blocks with a reverse proxy : •  VirtualHost is pointing on index.php •  Don’t load EzPublishCache() in index.php (only if you are using a reverse proxy) => otherwise Symfony2 will use internal reverse proxy and send to the real reverse proxy the HTML result of ESI blocks eZ Publish 5 : ESI support SLIDE 52Copyright © 2013 eZ Systems AS (except where otherwise noted). All rights reserved.
  • 53. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Varnish Cache SLIDE 53 Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture. A high level overview of what Varnish does can be seen in the video attached to this web page. https://www.varnish-cache.org/about
  • 54. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Varnish Cache – How to ? SLIDE 54 eZ Publish 5.x was tested with last major release of Varnish Cache ( 3.x ). All informations about installation, configuration are located here: https://www.varnish-cache.org/docs/3.0/installation/index.html How to start Varnish ? Two ways: Manually varnishd -f /usr/local/etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000 -a 0.0.0.0:8080! Init Script About varnish configuration (On Debian/Ubuntu OS): •  You have to modify your /etc/default/varnish file (configuration used by init.d script) For all Operating Systems, modify or create a new vcl file ( /etc/varnish/ default.vcl)
  • 55. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Varnish - Vcl SLIDE 55 •  vcl_recv: is the first VCL function executed, right after Varnish has decoded the request into its basic data structure •  vcl_hash: defines what is unique about a request •  vcl_hit: right after an object has been found in the cache •  vcl_miss: right after an object was looked up and not found in cache •  vcl_fetch: is the backend-counterpart to vcl_recv. Return deliver, tells Varnish to cache, returning hit_for_pass tells it not to cache, but does not run the vcl_pass function of VCL for this specific client.
  • 56. Copyright © 2013 eZ Systems AS - Florent Huck & Philippe Vincent-Royol Varnish VCL and eZ Publish 5 SLIDE 56 A dedicated VCL could be found on confluence https://confluence.ez.no/display/EZP/Using+Varnish Be careful: only multiple_http is implemented on this example. If you would like to switch to single_http, you have to create a Vmod or add some C code. Some tools to debug with Varnish: •  varnishlog •  varnishadm
  • 57. eZ Publish 5 and Varnish Exercise