EPHPMVC
EPHPMVC copied to clipboard
A simple, yet very much extendable MVC implementation for PHP 5.3
h1. EPHPMVC: A small but extendable MVC implementation for PHP 5.3
h2. Design Goals
h3. General
- Component should scale: from small web app to huge complex web projects
- Configuration over convention but sensible defaults
- Should be extendible with classic OOP measures: e.g. @Composites@ (GOF 163) could be used for complex views and complex routes
- Constructor based dependency injection for all the classes
- No singletons, no registries, multiple @Front Controllers@ (P of EAA 344) should live easily together
- Basic structure fully defined in interfaces
- Clear separation of packages ** @EPHPMVC\Standard@ is where the most simple example implementations live ** HTTP protocol specific implementations live in @EPHPMVC\HTTP@
h3. Dispatching/Routing
- Protocol agnostic: should be usable for Web, Mail processing, CLI utilities
h3. View
- Use closures as view helpers
- View helpers are conceptually the same as template variables
- Use PHP as the default template engine (no Smarty, no nothing)
h2. Ideas
- Implement an A/B split testing route
- Implement a CLI request/response/route triangle
- Implement XML processing request/response/route triangle. Routing expressions specified as XPath Queries
- Implement router to use @Page Controller@ (P of EAA 333) pattern