【正文】
t, from bean configuration to data access and transaction handling. So you are able to enrich your application with a Spring middle tier and/or data access tier, even if you just want to use . the transaction abstraction with JDBC or Hibernate. If just focussing on the web support, some of Spring39。ll simply use Spring as a library, with the root application context instance as entry point. All your registered beans and all of Spring39。t want to use Spring39。t need to duplicate your business objects39。t have a form, you don39。t generally aim to pete with existing solutions. It rather fosters seamless integration with standards like Servlet, JSP, JTA, JNDI, JDBC, and JDO, and wellsuited tools like Hibernate, Velocity, Log4J, and Caucho39。t particularly a web framework but a generic lightweight application framework with dedicated web support, and show the architectural differences to Struts and WebWork In contrast to Struts or WebWork, Spring is an application framework for all layers: It offers a bean configuration foundation, AOP support, JDBC abstraction framework, abstract transaction support etc. It is a very nonintrusive effort: Your application classes do not need to depend on any Spring classes if not necessary, and you can reuse every part on its own if you like to. From its very design, the framework encourages clean separation of tiers, most importantly web tier and business logic. : the validation framework does not depend on web controllers. Major goals are reusability and testability: Unnecessary container or framework dependencies can be considered avoidable evils. Of course, Spring39。s holding out for long time layer and Hibernate is one piece according to hold out for long time layer frame, is a kind of realization object and relation of the tool which reflect to shoot(O/R Mapping), it carried on the object of the lightweight to pack to the JDBC and make procedure member can usage object plait distance thought to operation database. It not only provided to shoot from Java to reflect of data form, but also provided a data a search and instauration mechanism. Opposite in usage JDBC and SQL to operation database, use Hibernate ability consumedly of exaltation realization of efficiency. The Hibernate frame use allocation document of the form e to the reflect of the definition Java object and data form to shoot relation, in the meantime at more deep of level of data form of relation explanation for the relations such as inherit of and containment etc. of Java object. Pass the usage HQL language sentence plications of relation the calculate way use the way of object description, to a large extent simplification logarithms according to of search, speed development of efficiency. Have in the Hibernate a simple but keep the API of view, used for to the database mean of object performance search. Want to establish or the modification be these objects, need in the procedure carry on with them to hand over with each other, then tell Hibernate to keep. So, a great deal of pack hold out for long time turn operation of business logic no longer demand write a trivial JDBC language sentence, make data last long thus the layer got biggest of simplification. Use the Struts realization MVC structure MVC(ModelViewController) is put forward by the Trygve Reenskaug, first drive application in the environment SmallTalk80, is many to hand over with each other with interface system of constitute foundation. According to the need of variable of the interface design, MVC hand over with each other constitute of system to resolve into model and see diagram, controller three part. Model(Model) is software processing problem logic at independence in outside manifestation under contents and form circumstance of inside abstract, packed the core data, logic of problem and function of calculation relation, independence in concrete of interface expression and I/O operation. See diagram(View) mean information and particular form demonstration of model data and logic relation and appearance to the customer. It acquire a manifestation information from the model, there can be many for homology of information dissimilarity of manifestation form or see diagram. The controller(Controller) is a processing the customer hand over with software with each other operation of, its job is control provide model in any variety of dissemi