MVC

  • A model represents the core business logic and state. A model commonly maps to data in the database and will also contain core business logic.
  • A View renders the contents of a model. A view accesses the data from the model and adds display logic to present the data.
  • A Controller acts as the glue between a model and a view. A controller delegates the request to the model for application logic and state and also centralises the logic for dispatching the request to the next view based on the input parameters from the client and the application state. A controller also decouples JSP pages and the Servlet by handling the view selection.