Atitit. ajax best practices and framework selection o99, atitit. ajaxo99
Atitit. ajax best practices and framework Selection
1. Selection framework dwr/dwr3 and jq 1
2. the convenience of DWR is divided into two parts. 1
3. Advantages of dwr: 1
4. Disadvantages: 2
5. Differences between root jq 2
1. Selection framework dwr/dwr3 and jq
2. the convenience of DWR is divided into two parts.
Front-end:
1. Automatic Generation of front-end js methods (the server automatically sends js scripts to the client ),
Users do not need to worry about it. It simulates the method calling form in the background and is easy to get started.
Background
1. Obtain the plug-in function of the Service bean in the background.
(Can be integrated with Spring and Struts) to provide service objects.
2. Provides implemented servlet resolution requests, lookup service objects, and execution requests,
Converts the returned results to the data structure recognized by js.
Author: old wow's paw Attilax iron, EMAIL: 1466519819@qq.com
Reprinted please indicate Source: http://blog.csdn.net/attilax
3. Advantages of dwr:
1. You can directly call the java class. Low learning costs.
2. Hides the process implementation in ajax. Java classes can be called directly by js.
3. You can convert a parameter to a javaBean (actually a js object. Converting and defining js objects of the same type is completed by the Framework. You only need to configure simple object ing conversion)
4. server push technology can be easily implemented
But the advantage cannot be ignored. The Debug function is powerful.
4. Disadvantages:
1. The background method is exposed.
2. Only java can be used as the background.
3. The efficiency is slower than that of a framework such as jquery.
4. dwr focuses mainly on method calls, not webpage element dom operations.
5. Differences between root jq
Jquey and prototype are powerful in front-end dom structure operations,
The two have different strengths and do not conflict with each other.