Unit 01 of 03
Framework Structure
A framework that derives template and file names from convention rather than configuration, routing that turns path patterns into a controller and an action, filters that run before the action and flash messages carried to the next request, and views compiled once and escaped on every render.
Published Updated
Lessons
- 01 Convention over Configuration The measuring axis of the course is how many requests a value stays for. The lesson runs the core, sorts thirteen observations into four stays, and shows that the template name is not written, is derived from names, and stays for this request. 13 min read
- 02 Routing Routing turns a path into a controller, an action and an identifier. The lesson measures that a path parameter becomes an integer, that a path that does not match the pattern is rejected, that the pattern order changes the result, and that the value stays only for this request. 15 min read
- 03 Controllers and Filters The controller is built anew on every request and the filter runs before the action. The lesson measures that the filter list is bound to the class, that the controller instance is bound to the request, and that the flash message is carried only to the next request. 3 min read
- 04 Views and Templates A template is compiled once and local values are escaped on every render. The lesson measures what escaping does, that a missing local value raises an error, that double escaping arises in a partial, and that the compiled template is persistent. 12 min read