-
Notifications
You must be signed in to change notification settings - Fork 20
Use Dependency Injection (Containers) wherever possible. Avoid Service Locators, if possible. Global services are requested by raising an event (e.g., ‘requestLogger’), which returns a logger.
With Dependency Injection, the provided services and objects are controlled by the calling instance. Dependency Injection Containers may help to keep the signature of constructor short, if several dependencies are required.
Service Locators are appealing on first sight, but tend to turn into an antipattern, as they provide global references and cannot easily be tailored for special use cases (HMVC, for example, may need different services for subsequent requests). Requesting services using events decreases coupling. The event dispatcher is responsible for caching the result of those events, so there is no performance impact.
Introduction
Development
Architecture
- Universal Content Model (UCM)
- Command Query Responsibility Segregation (CQRS)
- Database Abstraction Layer (DBAL)
- Dependency Injection (DI)
- Event Sourcing (ES)
- Filesystem Abstaction Layer
- Installer
- Data Definitions (JForms)
- Model-View-Controller (MVC)
- Orthogonal Component Structure (OCS)
- Routing
Features
Appendix