SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
Ezunconf 2012 – 18.10.2012 Code organisation / Design (Bundles, vendors)

- Dependency injection is used a lot in ezp5

the idea is, when you define dependencies you just define interfaces.
For example db layer the abstraction layer only deals with interfaces (public methods)

Testing is much easier e.g. Unit testing
e.g. 4900 unit test in fieldtypes

=> Discussion should the unit test included in the ez package? It should!

- Dependency injection container:

is a tool to use the depndency injection pattern
how to instantiate your services

- services:
services are defined in yaml files
services can override core services (it is done in ezp5)
if a service is instantiated it is shared for the whole application


Some examples shown yaml files + php

--

2 importened folders:

src:
all project files, custom templates

vendor:
libaries
all files in vendor folder should not be modified!

composer.json define all requirements for you project


- bundles => ez4 extensions

@see symfony documentation

symfony has a bundle generator => generate:bundle

Resources / public - folder includes design files like css ...


pagelayout rendering different – define blocks and extend or use it => the whole rendering is
managed over a view
in ezp5 tpl rendering in one whole step not like in ezp4 2 stage rendering process

Contenu connexe

Plus de 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
 
Björn Dieding - The Globalization Supply Chain - eZ Market Talk
Björn Dieding - The Globalization Supply Chain - eZ Market TalkBjörn Dieding - The Globalization Supply Chain - eZ Market Talk
Björn Dieding - The Globalization Supply Chain - eZ Market TalkeZ Publish Community
 
Peter Dodds - Paid content at Financial Times
Peter Dodds - Paid content at Financial TimesPeter Dodds - Paid content at Financial Times
Peter Dodds - Paid content at Financial TimeseZ Publish Community
 
Stuart Wilkinson - Media audit and brand consistency - metrics and trends fro...
Stuart Wilkinson - Media audit and brand consistency - metrics and trends fro...Stuart Wilkinson - Media audit and brand consistency - metrics and trends fro...
Stuart Wilkinson - Media audit and brand consistency - metrics and trends fro...eZ Publish Community
 
Martin Bauer - Scrum, The Financial Times & eZ Publish
Martin Bauer - Scrum, The Financial Times & eZ PublishMartin Bauer - Scrum, The Financial Times & eZ Publish
Martin Bauer - Scrum, The Financial Times & eZ PublisheZ Publish Community
 
Marc Czieslick - flash-talk - Content Cockpit
Marc Czieslick - flash-talk - Content CockpitMarc Czieslick - flash-talk - Content Cockpit
Marc Czieslick - flash-talk - Content CockpiteZ Publish Community
 

Plus de eZ Publish Community (20)

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
 
Björn Dieding - The Globalization Supply Chain - eZ Market Talk
Björn Dieding - The Globalization Supply Chain - eZ Market TalkBjörn Dieding - The Globalization Supply Chain - eZ Market Talk
Björn Dieding - The Globalization Supply Chain - eZ Market Talk
 
Peter Dodds - Paid content at Financial Times
Peter Dodds - Paid content at Financial TimesPeter Dodds - Paid content at Financial Times
Peter Dodds - Paid content at Financial Times
 
Stuart Wilkinson - Media audit and brand consistency - metrics and trends fro...
Stuart Wilkinson - Media audit and brand consistency - metrics and trends fro...Stuart Wilkinson - Media audit and brand consistency - metrics and trends fro...
Stuart Wilkinson - Media audit and brand consistency - metrics and trends fro...
 
Martin Bauer - Scrum, The Financial Times & eZ Publish
Martin Bauer - Scrum, The Financial Times & eZ PublishMartin Bauer - Scrum, The Financial Times & eZ Publish
Martin Bauer - Scrum, The Financial Times & eZ Publish
 
Marc Czieslick - flash-talk - Content Cockpit
Marc Czieslick - flash-talk - Content CockpitMarc Czieslick - flash-talk - Content Cockpit
Marc Czieslick - flash-talk - Content Cockpit
 

Code organisation / design : vendors, bundles, services-di

  • 1. Ezunconf 2012 – 18.10.2012 Code organisation / Design (Bundles, vendors) - Dependency injection is used a lot in ezp5 the idea is, when you define dependencies you just define interfaces. For example db layer the abstraction layer only deals with interfaces (public methods) Testing is much easier e.g. Unit testing e.g. 4900 unit test in fieldtypes => Discussion should the unit test included in the ez package? It should! - Dependency injection container: is a tool to use the depndency injection pattern how to instantiate your services - services: services are defined in yaml files services can override core services (it is done in ezp5) if a service is instantiated it is shared for the whole application Some examples shown yaml files + php -- 2 importened folders: src: all project files, custom templates vendor: libaries all files in vendor folder should not be modified! composer.json define all requirements for you project - bundles => ez4 extensions @see symfony documentation symfony has a bundle generator => generate:bundle Resources / public - folder includes design files like css ... pagelayout rendering different – define blocks and extend or use it => the whole rendering is managed over a view in ezp5 tpl rendering in one whole step not like in ezp4 2 stage rendering process