Object Annotations (JSON) is a text format that is similar to XML and can be used to exchange data. JSON design to ensure that two aspects, on the one hand easy to read, on the other hand easy machine parsing, it uses the C-series language similar to the Convention. Also associated with JSON is JSON-RPC, a remote procedure call (RPC) protocol that resembles XML-RPC, but is oriented to the JSON language. As a statute, JSON-RPC is implemented in many languages, including Java, Ruby, Python, and P
with the server Exchange data, so if directly embedded in the JSP code to judge, then back to the page to the JSP variable value is actually the last exchange data with the server after the cache value, will not execute JSP code. Then must require the use of HTML code with the server data exchange, that is, with JS to communicate with the server, this must use Ajax.
If you use the DWR framework, you will need to obtain the SESSION,
easily Use menus and tab pages) tree Structure, calendar, text editor, and other effects. Of course, non-synchronous Ajax functions are also supported.
In addition, because Ajax uses dynamic operations on file objects, users cannot use previous pages or next pages, or use functions like "My favorites, correct bookmarks are left on the pages required by the user, but these requirements have been addressed by Dojo. Compared with other lightweight Ajax frameworks, it is obvious that it takes a lot
think it's difficult to get started with javascript, but it's just a little difficult to debug. I had to output alert without stopping. Later I learned about firebug, and sometimes I used breakpoints. However, most of them are easy to use alert.
HTML: it is not difficult to get started. After all, most of them use open-source examples for the interface.
CSS: simple.
IDE: Uses myeclipse, which is more comprehensive than eclipse integration.
For novice web Development recommend that everyone's we
AJAX development, debugging is more complicated because it needs to identify whether the error is generated by the client or the server. In the past, the JavaScript debugging method was to delete all the code and add a row until the error occurs. Now, more developers return to Microsoft Script Debugger for IE and Venkman for Mozilla Browser.
Browser compatibilityThe biggest problem with JavaScript programming comes from the support of various technologies and standards by different browsers. Bu
DWR:
In the development process, you mainly do:
1. Develop Java classes. No new things.
2. Configure Java classes.
--At the time of configuration, the
Where the
3. Invoke Java methods remotely in the browser's JS code.
1. Remote, asynchronous invocation of Java methods requires an extra pass in a parameter.
A parameter is a callback function that is shaped like function (data) {}.
Where data represents the return value being invoked.
2. When Java
Let's talk about something that seems irrelevant to the title.
With the popularity of ajax frameworks such as prototype DWR,The server generates js Code and returns it to the client. Calling (direct call or eval) by the client seems to have become a normal practice (I don't know if it is popular ).
This method (actually a design) is understandable, but often misunderstood and applied.(Here the so-called "error" is based on my position. Maybe more peop
types) Make debugging more difficult. In Ajax development, debugging is more complicated because it needs to identify whether the error is generated by the client or the server. In the past, the Javascript debugging method was to delete all the code and add a row until the error occurs. Now, more developers return to Microsoft Script Debugger for IE and Venkman for Mozilla Browser.
Browser compatibilityThe biggest problem with JavaScript programming comes from the support of various technologi
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
for 1000ms)SetInterval method, which allows your code to execute the specified method at a specified time until clearInterval is called.For example:Alert (1 );Timer = setInterval ("alert (2)", 1000 );Alert (3 );The code is basically the same as above. The difference is that alert (2) will be executed once every ms until the callClearInterval (timer );We should note that setTimeout and setInterval are both window methods.We can use it directly, but we still call window. setTimeout window. setInt
when executing to settimeout. Wait for 1000ms to execute alert (2)
SetInterval method, he lets your code execute the specified method every time specified, until the call to Clearinterval
Like what:
Alert (1);
Timer = setinterval ("Alert (2)", 1000);
Alert (3);
The code is basically the same as the above, and the difference is that alert (2) is executed every 1000ms, until the call to
Clearinterval (timer);
We should note that both settimeout and setinterval are window methods.
We can use it di
double variable assignment (usually due to lack of data types) make debugging more difficult. In the development of Ajax, debugging is more complicated, because it needs to identify whether the client or server-side error. In the past, the way JavaScript was debugged was to delete all the code and then increase the line until the error occurred. Now, more developers are back to Microsoft Script Debugger for IE and the Venkman for Mozilla browsers.Browser compatibilityThe biggest problem with Ja
read of an XML file and constructed as a DOM object for the program to use, the advantage is easy to operate, but less memory. Sax is parsed in an event-driven manner and consumes less memory, but programming is complex14, what frame are you using (Rack package)? This question is a must ask, generally also the beginning will ask. More popular in Java are Dojo, Prototype, JQuery, DWR, ExtJS, etc.15, if you are familiar with some kind of Ajax framework
This article introduces how to add Ajax effects to form verification of struts2.
First, DWR servlet (UK. Ltd. getahead. DWR. dwrservlet) dojo and Ajax theme are required. DWR is used for normal verification of dojo to process Ajax results.
Next, configure DWR, write DWR. XML
SPRINGMVC+DWR3 implementation message accurate push (annotation way + file way)
This article assumes that the SPRINGMVC configuration is complete and that the configuration is added above the SPRINGMVC configuration. Since some of these principles are not yet understood, the configuration for each one does not explain why
DWR3 is downloading the latest from the DWR official website. Http://directwebremoting.org/dw
JavaScript bugs such as double variable assignment (usually due to lack of data types) make debugging more difficult. In the development of Ajax, debugging is more complicated, because it needs to identify whether the client or server-side error. In the past, the way JavaScript was debugged was to delete all the code and then increase the line until the error occurred. Now, more developers are back to Microsoft Script Debugger for IE and the Venkman for Mozilla browsers.
Browser compatibilityT
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.