Three layer architecture
- Presentation layer/View Layer/Control Layer (Web layer/Controller layer)
- Business Logic Layer/Service Layer
- Persistence layer/Data Access Layer (DAO layer)
1.1 the layered
In actual project development, three layers of architecture are used to decouple, and the functions of each layer are as follows
- The view layer, used to display data and receive user input data, provides an interactive operation interface for users.
- The business layer, which embodies the core value of the system architecture, is responsible for the business logic
- Data access layer, operating directly on the database
1.2 SSM framework
The call relationship between the layers is as above, inSSM framework
In:
- SpringMVC: Implements the View layer
- Spring: Manages the life cycle of all objects creation, initialization, maintenance, destruction, etc
- MyBatis: Implement the Dao layer
1.3 Package Naming conventions
XXX: indicates the company name yyy: For the project name com. XXX, yyy daodao layer interface com. XXX. Yyy. Dao. Impldao layer to realize the com. XXX. Yyy. Serviceservice layer interface Com. XXX. Yyy. Service. Implservice layer to realize the com. XXX. Yyy. Com webweb layer. XXX. Yyy. Util kit Com. XXX. Yyy. DomainjavabeanCopy the code