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