what can struts and hibernate do?struts,
Control-layer Solutions in MVC
Can make request data automatic encapsulation, type conversion, file upload, data check ... such as
Hibernate,
Solutions for durable Tiers:
Can do,
Save the object to the database
The object is taken from the database
* The traditional development model
Project development based on MVC model;
The structure of Project framework based on MVC;
Entity/dao/service/action
1. Entity class Class user{ } 2. Dao Class userdao{ .. Access db } 3. Service Class userservice{ Userdao Userdao = new Userdao (); } 4. Action Class useraction{ UserService userservice = new UserService (); .. Get data or results } User access: /user.action----> Tomcat (Server Create action, Service, DAO Thinking: 1. Object creation can I write to death? 2. Object creation Details Number of objects Action multiple "maintain member variables" action is a multi-instance Service One "does not need to maintain public variables" DAO one "does not need to maintain public variables" Creation time Action Access time created Service startup time created DAO starts when you create 3. Object dependencies Action Dependent Service Service Dependent DAO ======================================================= Summarize: Spring is the solution to the above problem! In simple terms, it is the process of creating objects and the dependencies of objects! |
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
What is spring spring used to solve the problem?