Stratified development, layered architecture
Stratified term development:
Data Access Layer (DAO): responsible for operating the database, interact with the database
Business logic layer (service): responsible for achieving business functions
Presentation Layer (UI): responsible for receiving information to the user, and display information to the user.
Two tiers:
Two tiers comprises a data access layer and the presentation layer,
Layer architecture business presentation layer implementation.
Stratification characteristics of the development of:
1. Each floor has its own responsibilities
2. floor without a real understanding of the underlying implementation details to its functionality through the use of lower external interface
3. The upper layer can be called lower, upper lower not call
Stratified developed a little
1, the function of each layer to focus on their realization, easy to improve code quality
2. Easy division of labor to improve development efficiency
3. facilitating code reuse and the extended
Layered architecture naming convention:
Package naming convention:
Dao to deposit the interface layer packages: dao
Storage dao implementation class package: dao.impl
Dao layer packet entity classes: entity;
dao layer interface: Table Name dao +
dao layer implementation class: table name + dao + impl
Naming the business layer:
Storing packet service layer interface: service
Service implementation class storage layer packet: service.impl
Naming service layer interface: table name service +
Naming service layer implementation class: the table name + Service + Impl
javaDao mode
dao mode: data access objects, acting as a data access layer
※ situated between the business logic and data persistence, enabling access to persistent data
Dao layer composition
dao layer interface, dao layer implementation class, the entity class, the class database connection and closing means