Layered Approach.
The actual architecture of the application has been separated out into several layers.
1. Presentation view 2. Presentation logic 3. Business logic 4. Data Model
1. Presentation view.
This is the actual look,feel and presentation of the application. In J2EE,Java Server Pages (JSP) are used to implement your view.
2. Presentation Logic
This is the code required to call business logic and return output to the view. Java Servlets / java beans are the best way to implement presentation logic.
3. Business Logic
This is code required to execute the usecase actions and manipulate the data model. EJB Session beans are the containers of the business logic for all your usecases.
4. Data Model
J2EE provides a useful abstraction for your data model,called EJB Entity beans. These are persistent objects that model your real world business abstractions.
The layered approach has the following benefits: • Encapsulation – each layer hides details from the other layers. Therefore a layer can change without affecting other layers. • Separation - Complexity in the system is easier to manage because each layer is focused on a cohesive set of responsibilities. • Reuse – each layer can provide services to the layer above,so classes can be reused whilst still abstracting the implementation details.
This leads to applications that are more flexible and maintainable.
|