Skip to content

Extended MVC

Koen Teuwen edited this page Jul 16, 2021 · 2 revisions

We make use of the Model-View-Controller framework.

Generally speaking, the model layer is responsible for the interaction with the database and data manipulation. Next, the view layer is responsible for rendering data into a web page. The controller is responsible for processing the request and interacts with the model and view layer to provide a response.

When we add some extra layers, we (approximately) get the following architecture within each module: modules.svg

The responsibilities are as follows:

  • Model: representing a data entity
  • Mapper: interaction with the database to process Models
  • Form: representation of the data fields of the Model with validation options
  • Service: takes care of complex logic
  • Controller: handles requests and serves a response
  • View: renders the web page