servlet- application mysql-1

A project of architecture: the three-tier
  content presentation layer (web layer, view layer, presentation layer ...) :( users can directly access) Servlet, html ......

  Business logic (Service Layer): java class, service providing processing method

  Data Persistence Layer: Dao layer (interacting with the database) only the operation of the database, providing a database data CRUD method
    Dao layer project as demand changes frequently, DAO layer is typically oriented programming interface, using the interface specification operations on the table database

 

Development Process:
1, database table [bookstore0706, bs_user]

2, a correspondence table creating a javabean [User]

3, into the database associated with the jar package [MySqlConnection database driver, the c3p0 jar package database connection pool and the configuration file, DbUtils tools]

4, data modification c3p0 configuration file: database name, account password

5, JDBCUtils tools [obtaining method database connections and provides connection release]

6, BaseDao [provide a basic operation of the database, including additions and deletions, a record query, a query set]

7, UserDao [all operations bs_user Table]
UserDao interface to
achieve particular operating table UserDaoImpl

The completion of each module functions 

 

10, using a layered architecture of the project
  to add business logic layer: service, business logic changes very much, also oriented programming interface
  UserService: Constraints business logic operations on the user's
  UserServiceImpl:
  Presentation Layer -> Business Logic Layer -> persistence layer -> database

Guess you like

Origin www.cnblogs.com/liubosong/p/11991229.html