Monday, 26 August 2013

what MCV design patterns and entity bean ?

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: 
  • 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

The entity bean will be an abstraction and then to represent the data, the session bean can perform operations on the entity, the servlet will collect input from jsp (you) to make requests to the session bean and communicate results to jsp and so on. 


Related issue :


No comments:

Post a Comment