Struts + Spring + Hibernate Application

xiaoxiao2021-03-06  84

We will be WEB TIE. Domain Tie. Resource Tie.. Of the RESOURCE TIE is also the database layer I want to omit .. also said that the development is mainly two layers of Web and Domain. ... 1. Web layer: Struts MVC framework, don't tell everyone, you should know it .. Since I have seen the Spring's Web MVC framework, I think it is more like to like the descending of the latter ... Struts Advantages: a. A variety of different action let the user choose, can be said, the soul of Struts in action .. For Spring MVC, there are many Action, which is almost like Struts ... B. Actionform, after this Sometimes I feel very easy, but sometimes I feel a cumbersome, at least I think so .. For Spring, it is just a general javabean, but the principle is the same, through Request .GetParameters () comes to Populate to Javabean to go to Javabean. Multi-type Tags. Contains Bean, HTML, Logic .., etc., I believe this is also one of the reasons for Struts ..... For Spring For this, there is no support, everyone can only support the third party, such as: jstl .. I prefer to use JSTL, although Struts also has its own struts-el (I feel Copy JSTL, huh, huh). .... d. validation .. Verification is essential for a website, especially commercial websites, for Struts's JS verification, everyone must feel very convenient. Yes, especially for clients JS verification can reduce the pressure of many server-side ............ For Spring MVC, although there is also Validation function, but I don't think there is still no Struts Validation. " Layout .. A good website (whether it is commercial, or non-commercial), even if there is a very powerful function, if there is no good layout, it is believed that the server is very hard. But if your layout is good It can be more than half of it ... Spring has no such function, but you can integrate Tiles..

2. The Domain layer first told Hibernate first. This is an ORM (Object / Relational maping) .. Other everyone should know .. So mainly establish PO, then generate HBM files to correspond to the database ...

I said the Web and Po .. For a general process can be divided into: Web <= web TIE || Domain TIE => Service <==> DAO <==> Po Next I can say Spring Applications: a. Manage Hibernate's sessionFactory, which provides Hibernate to better manage Session, b. DAO features, Spring provides HibernatedAosupport HibernateTemplate for Hibernate. Make users more convenient processing PO .. (DAO) c. The Transaction feature, this is essential. (Mainly in service)

This is what I have to say, you can better combine struts, Spring, Hibernate

转载请注明原文地址:https://www.9cbs.com/read-122663.html

New Post(0)