It is a common practice to implement the Model-View-Controller (MVC) design pattern in a Java EE application. In fact, parts of the Java EE standard are designed around this pattern. The goal of the MVC pattern is to separate business logic from the user interface. The MVC pattern splits an application into three separate parts, each with its own responsibilities, as follows:
Model: This part is responsible for manipulating application data. In other words, the Model implements the business logic.
View: This part is responsible for presenting the contents of the Model to the user, and providing ways for the user to send data or commands to the application.
Controller: This part defines the behavior of the application, and is responsible for receiving the user’s input.
So far in this book, we have only created a view and a controller for an application. In a JSF-based application, the View consists of all of the JSP or Facelets pages. The JSF Controller...