Summary of the online bookstore project
1 Project Outline design:
Demand analysis
System Design
Detailed design
Permission Design
2 Technology Selection:
Servlet+jsp+javabean
Listener+filter+jstl+fileupload+c3p0+dbutils+mysql
3 Development Order:
From the DAO layer to the service layer to the Web tier
Online Bookstore Demand Analysis:
Respectively to the administrator, ordinary users, the system three user roles of the various functions of the implementation.
This includes the administrator of the book store backstage books and books category categories, additions and deletions, as well as the status of orders;
Ordinary users for the purchase of books, browse, shopping cart management and confirm the submission of orders;
System Management role for the user login registration, permissions control and so on.
Design of online Bookstore system
The system is designed into web layer, service layer, DAO three layer structure, front page collects user data and user operation;
Service is the business logic layer, usually each method handles a separate business logic, and the business may need to manipulate the database or simply manipulate the memory;
The DAO persistence layer is the data stored in the database or obtained from the database
Detailed design of online bookstore
1 Database design (according to domain domain object design) not explained in detail here
2 DAO layer Design: Using reflection technology plus some design constraints on domain classes write a generic DAO class that satisfies the database operational requirements of all domain objects:
Domain Class design constraints:
1 each domain class has a static constant string that records the table name of the corresponding database table.
2 provides the ID field of the string type,
3 The name of all fields corresponds to the column name of the database table,
4 Follow JavaBean thought
3 Service Layer Design
The DAO class that is created uses reflection technology to also provide a unified service class that is responsible for the vast majority of common business logic, and provides a specialized service class to handle the business logic when there is special business logic
4 servlet Design (servlet+jsp)
Design of JSP page
The home page displays the homepage of the ordinary user, on the homepage provides the login entrance, if uses the Administrator account to log in, jumps to the Administrator homepage. General User Home page theme is a list of books, and provides a query area for users to query specific books
In addition, the shopping cart and the production order design are simulated online shopping process, no longer repeat.
Coding approximate Process
Create a project
Build a Package
Import the required Jar packages
Create a domain class
Tool class
Source: Provide Bookstore.rar download.
Online Bookstore Project Summary (Servlet_jsp+javabean)