- Enterprise is nothing but a business organization.
Business Organizations will provide their services to customers.
If any computer application that is used to computerize these business services is called as Enterprise Application.
Ex : Banking Application , Hospital management etc.,
To atomize these services of Business Organizations, we have to perform 4 common tasks in every enterprise application irrespective of the domain.
To perform these tasks industry is following Layered architecture.
- Persisting (storing) the enterprise data in a secured and easily retrieval manner.
- Accessing stored data from the persistent storage.
- Processing of data according to the enterprise rules.
- Providing interaction to the end-user.
According to this architecture each task in divided into 4 layers.
- Data layer
- Data-Access layer
- Service layer
- Presentation layer
- If we use java technologies and java based frameworks to develop enterprise applications then it's called as java based enterprise application.
- Java technologies and java application frameworks used in java based enterprise applications.
- Presentation layer : Servlets, Jsp, Java Beans, JSF, Struts, Spring MVC, Wicket, Tapestry
- Service layer : EJB, Spring
- Data-Access layer : JDBC, JPA, Hibernate, Ibatis, Toplink, JDO
Data layer :
Ex : Oracle , DB2, MS SQL, MySQL etc.,
Data Base professionals will develop this Data layer.
Data Access layer will communicate with this Data layer and perform CURD operations with the Database.
- Collection of relational tables of an enterprise application is a Data layer.
- Data layer is nothing but Data-base.
- Almost always RDBMS acts as Data-Base.
Data-Access layer :
A collection of classes whose methods will perform CURD operations with the Database is known as Data-Access layer.
It will receive the request from Service layer.
Based on the request, it communicates with Data layer and performs CURD operations.
After performing CURD operations it will return appropriate response to Service layer.
Service layer :
A collection of classes whose methods performs data processing according to the business rules of an enterprise is known as Service layer.
For each service provided by the enterprise, functionality is implemented in this layer and hence it is called as Service layer.
- It will receive the request from Presentation layer.
- If required, it will communicate with the Data-Access layer and get the response.
- Based on the response it will process the data according to the business rules.
- Finally it will give the appropriate response to the Presentation layer.
Presentation layer :
A part of enterprise application which deals with providing interaction to end-user is nothing but presentation layer.
- It will take the form data and validate the data according to business requirement.
- It will send the request to Service layer.
- Based on the response it will generate the response page for the end-user.