JSP is the first self-developed the first step towards WEB, WEB at the time have little concept of, let alone clear the system planning. Of course, constitute a pure JSP can not be the system or structures. Then do a few small systems are all-even the JDBC connection string are written in JSP, and even write a one page. Few years later, when the students get to my old system when the graduation project, the single database connection is to adjust the cost of my days. . .
Later learned that the MVC framework, began to try to interface and business logic separation, it noted that the most difficult part is the transmission of data before and after Taiwan. I was beginning to pass through the data bean value, the background to deal with data write good bean, and then into the web scope bean, and then remove the data bean out front, but the process will inevitably always be some logic to determine, even Sometimes map is also easy to deal with directly in front of some business logic.
And then studied struts1.x framework, the most impressive was the guiding ideology is not to appear on the page <%%>, to make full use of pure. Html, and then through the struts tags to obtain data, processing logic. However, after some time, the feeling was忽悠, and with the use of struts tags and jsp directly in essence is the same as them, and then started a very annoying struts, a feeling that it is忽悠mad and do things to do in form, the servlet packaging under the action out on the搞个with ActionForm to help us from the pages of data to mass action, but seems to return when the data or to use request.setAttribute (), only it can be set to support a number of functions, such as data validation, multi-language support, but it seems that the only meaningful is that the previous controller, but the introduction of a function for this so a lot of things very uncomfortable feeling. Of course, this is only my feeling浅尝辄止. But if I have to use the next aids mvc framework, I am sure springmvc own choice of spring, and more or less the same, but the introduction of a pile of small things can reduce the complexity.
Then a DWR, feeling more comfortable. Because it is in the background to call JS methods, data, and then directly enter HTML organize JS, the page looks a lot cleaner. We just feel that doing some of DWR, I want is interaction data, it is indeed a method to provide a direct call, but also the background of the type of binding, do not always feel that对劲. In addition, at that time do not know why, DWR invoked method returns the data from HIBERNATE object found in the JS are all empty, and in the print method to confirm the data is there, probably with the object life cycle are related to what you had to manually copy it again to send those objects to be returned to the value of success. This is the only use, not a deep understanding of the feelings of the.
Now it is like to use jQuery, it is easy to use AJAX to be the background data, and then the domain with the spring effect of the scope of the definition of the definition of a number of direct and singleton bean scope is set to session, used to store information, so do not have all day to look for the session object. But the main problem is larger than when the time data, javascript to deal with the return of the data easily lead to loss of response to the browser, that is, the use of settimeout (), and the speed is obviously too slow, so not a good program. Before a small amount of data compromise is the JS display processing, a large amount of data or a jump in the server-side assembled good HTML.
Have time to study, such as under the principle of the DWR and EXTJS to see what can find a reference, to efficiently clean a large amount of data received and processed. Estimates or rely on javascript.







