A summary of Java EE knowledge points

Source: Internet
Author: User

a Summary of Java EE knowledge points What is tiered development?

a software development method that is small and divide-and-conquer.

Features of Layering:

1. Each floor has its own Responsibility.

2. the previous layer does not care about the next layer of implementation details, the previous layer with the external interface provided by the next layer to use its Function.

3. The previous layer calls the next layer of functionality, the next layer cannot invoke the function of the previous Layer.

Benefits of tiered development:

1. Each layer focuses on the realization of its own function, which facilitates the improvement of Quality.

2. facilitate the division of labor and cooperation, improve development efficiency.

3. facilitates the reuse of Code.

4. facilitate the extension of the Program.

principle of Encapsulation:

each level exposes the interface outward, but hides the inner details.

Sequential Access Principles:

The next tier serves the previous tier, but not the service on the previous tier

to pass data using an entity Class:

in a hierarchical structure, data is transferred between different tiers through entity classes

Summary of Hierarchies:

DAO is located between business logic and persisted data, enabling access to persisted data

mainly by DAO interface,DAO Implementation class, entity class composition

database connection and Shutdown tool classes for code reuse

features of layered development:

each floor has its own responsibilities.

the previous layer calls the next layer of functionality, the next layer cannot invoke the previous layer of functionality

advantages and principles of layered development:

it is easy to improve development quality, improve development efficiency, facilitate code reuse, facilitate program extension, and reduce the coupling of code.

layering should adhere to the principle of encapsulation and sequential access

transferring data between different tiers through entity classes

the entire jdbc application process:

1. set up Database epet, build table

2. Create the Entity class, and the corresponding data table is the corresponding , class name:entity belongs to the package name is (com.beiwo.epet.entity );

3. Create the Dao's base class interface class basedao, class name:. Basedao belongs to the package name Is: (com.beiwo.epet.dao.BaseDao);

4. Create the Dao Implementation class basedaoimpl, class name:basedaoimpl The owning package name Is: ( Com.beiwo.epet.dao.impl.BaseDaoImpl ) ;

5. Create a specific table of Dao class, class name:Petdao belongs to package name: ( Com.beiwo.epet.dao.PetDao);

6. Create a concrete table of Dao 's implementation class, class Name:petdaomysqlimpl The owning package name ( com.beiwo.epet.dao.impl.PetDaoMysqlImpl);

7. Create the interface class for the business Logic layer , class name:petservice The owning package name ( com.beiwo.epet.service.PetService);

8. Create the interface implementation class for the business Logic layer , class name:petservieimpl The owning package name ( com.beiwo.epet.service.impl.PetServieImpl);

9. Create a test class

A summary of Java EE knowledge points

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.