The two-week Javaweb mall project has been completed today, and in these two weeks, it has found its own shortcomings, but also learned a lot.
First of all to record their own learning, memory is poor, the key is afraid to forget the time. This week's mall project is mainly about the development model of the enterprise. Learning a framework pattern, it should be the MVC framework. Our project divides it into the Model layer, the controller layer, the View layer, the DAO layer, the service layer. Each level of the task of division of labor in layman's terms is this:
Model layer: Responsible for some entity classes. For example, user class, Commodity class, Order class, etc. (should be the corresponding database table);
Controller layer: Responsible for the request to the page, so that calls different service layer or DAO layer services, and then jump to the next page, jump page is the time to pass the value (Request.setattribute (); Request.getsession (). setattribute ("cart", cart);
View layer: Responsible for JSP pages or HTML pages.
DAO Layer: Operations with the database.
Service: The business logic layer. (For example: login, registration, add shopping cart, etc.);
The main diagram is as follows: