Just putting together notes about MVC implementation practices, for further use.
- Singleton object, has all the information about the current request.
- Can parse data (e.g. getPayloadAsJSON, getPayloadAsXML, readParamAsJSON, isMobile, etc).
- Optimized singleton-ish getters. Data is parsed for the first time only when it is needed, and not re-processed if called again.
- Reponsible for understanding the requested URL and give direction of who (
Controller
and method) should handle it. - Uses the
RequestContext
to understand the request