Page controller pattern

From CSSEMediaWiki
Revision as of 00:37, 19 October 2010 by Martin Doms (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In the Page Controller web presentation pattern, each URL on the web server is mapped to a page controller. The page controller handles the HTTP request and instantiates appropriate views and model objects. Page controllers are in charge of:

  • Decoding the incoming URL to figure out the data required.
  • Instantiating and initializing model objects to handle the request.
  • Determining which view should render the model object data.

PageController.png

Each page controller should be mapped to a URL scheme. For example, a MovieController would map to the /movie/ URL.

Personal tools