Model/View/Controller

BACK | UP | NEXT
There are three separate parts to developing a web application:
  • Back end databases, core busines logic (eg: a Search API), all of which is likely implemented as ordinary Java objects with standard looking Java APIs. This portion of the application is called the model.

  • The look and feel of the site, how the pages are layed out, how the pages are related to one another, and what exactly appears on each page. This is called the view.

  • Housekeeping and session tracking: logging the request, managing cookies, tracking the user, keeping session data, and managing the connection. This is the responsibility of the controller.
WebMacro is a servlet framework which supports and enforces the model/view/controller design.

WebMacro enforces a separation of concerns between page layout and program code. There is an additional separation enforced by the servlet API between controller code, and back-end models.

An application built around WebMacro has three parts:

  • A controlling servlet
  • A template view.
  • A Context containing a JavaBean model.
In order to understand WebMacro you should have a good understaing of what a servlet is, what a template is, and how a WebMacro context works with a Java bean.

BACK | UP | NEXT