Hibernate Learning Notes Chapter I: Java EE application and development environment

Source: Internet
Author: User
Tags object object

1. Layered model for Java EE applications
1.1. The Java EE architecture pattern can be broadly divided into the following layers:
>> domain object layer: This layer is composed of Pojo (Plain old Java object, common, traditional Java objects), which are domain object of the system, Often contain the business logic methods that they need to implement.
>> DAO (Data Access Object) Layer: This layer consists of a series of DAO components that implement yard operations such as creating, querying, updating, and deleting databases.
>> business Logic Layer: This layer is composed of a series of business logic objects, these business logic to the laid-off implementation of the system required business logic method.
>> controller layer: This layer consists of a series of controllers that block the user's request and invoke the business logic method of the business logic component, process the user request, and forward to different presentation layer components based on the processing results.
>> Presentation layer: This layer consists of a series of JSP pages, velocity pages, and PDF document view components that collect user requests and realistic processing results.
The Java EE components of each layer are coupled loosely coupled, and the components are not hard-coded to be coupled, which improves the extensibility and maintainability of the application.
1.2. Components for Java EE applications
>> Presentation Layer Components: The most common is JSP.
>> controller components: for the MVC framework of Java EE, the framework provides a front-end core controller.
>> Business logic components: the core components of the system to implement the business logic of the system. Typically, a business logic method corresponds to a user action. The business logic approach is only responsible for implementing the business logic and should not be accessed by the database. Therefore, the original hibernate, JDBC, and other APIs should not appear in the business logic component (more important because of the fact that the implementation of the business logic approach is separated from the specific persistence layer access technology. Ideally, the persistence layer API is not present in the business logic component.
>> DAO Components: Each DAO component provides basic creation, query, update, and delete operations for the domain object object, which correspond to atomic operations such as Ciud of the database. To separate the implementation of the business logic component from the implementation of the DAO component, we provide an interface for each DAO component, and the business logic component is programmed for the DAO interface to provide better decoupling.
>> domain Object component: The domain object (POJO) abstracts the system's object model. In general, the state of these domain objects must be kept in the database, so each domain object typically corresponds to one or more data tables, and domain objects often need to provide access to the data records.
1.3. Common Java EE servers
Lightweight Java EE architecture: struts2+spring+hibernate, without the need for professional Java EE Server support, can only be run with a simple Web server.
Common Web servers include the following:
>> Tomcat:sun The official recommended JSP server.
>> Jetty
>> Resin
>> JBoss
>> WebLogic and WebSphere: Professional commercial Java EE servers are expensive.
For lightweight Java EE, it is not necessary to use a Java EE server, just a simple web container.
2. Lightweight Java EE application-related technologies
Lightweight Java EE applications use the traditional JSP as the presentation layer technology, with the open source framework as the MVC layer, the middle tier, the persistence layer solution, and combine these organically, make the Java EE application have the high extensibility, maintainability.

Hibernate Learning Notes Chapter I: Java EE application and development environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.