Chapter 5. Understanding controllers and services
- Controllers and their responsibilities
- Metaprogramming and inspection capabilities on artifacts
Wading through Griffon’s MVC is quite a journey, but we’re almost done reviewing what it has to offer. The final piece we’ll look at takes care of routing all of the user’s input to and from the appropriate handlers. We’re talking about the brains of your application: the controller member of the MVC triad. In Griffon, this member is mostly represented by controllers; services are also used to a lesser extent.
Simply put, controllers have the responsibility to react to inputs, usually coming from the UI. Inputs may also come from other locations, such as a service ...