Introduction
MVC is a design pattern (a general design solution for problem solving) widely used in software design.
MVC Stands for Model Controller View.
MVC is achieved through 3 components:
This pattern ensures the division between business logic(managed by the model) and user interface (run by and view controller).
Wanting to apply this pattern to the Java EE, you can use the following Java technologies applied to various components of the pattern.
Model: This component can be implemented through the entity bean and session bean Controller: It can be implemented by the servlet. View: The latter through jsp and / or jsf.
- the model contains the data and provides methods for accessing them;
- The view displays the data in the model;
- the controller receives the commands(usually through the view) and implement them by changing the status of the other two components
This pattern ensures the division between business logic(managed by the model) and user interface (run by and view controller).
Wanting to apply this pattern to the Java EE, you can use the following Java technologies applied to various components of the pattern.
Model: This component can be implemented through the entity bean and session bean Controller: It can be implemented by the servlet. View: The latter through jsp and / or jsf.
In general terms, entity objects encapsulate the business policy and data for
- the logical structure of the business, such as product lines, departments, sales, and regions
- business documents, such as invoices, change orders, and service requests
- physical items, such as warehouses, employees, and equipment