Game Development Reference
In-Depth Information
Now, in contrast, that exact functionality can be achieved with the following code us-
ing jQuery:
$.ajax({
type: "GET",
url: "//www.some-website.com",
async: true, /* This parameter is optional,
as its default value is true */
complete: function(response) {
// Process response
// (…)
}
});
One of the awesome things about jQuery's XHR functionality is that it is highly flex-
ible. At a bare minimum, we can achieve the same behavior as in the previous code,
in a completely cross-browser fashion, as shown in the following code:
$.get("//www.some-website.com",
function(response) {
// Process response
// (…)
});
In conclusion, much can be done with very little effort, time, and code, with jQuery.
All of this also comes with the added benefit that the library is developed by a very
dedicated team, with a very involved and active community behind it. For more in-
formation about jQuery, check out the official website at http://www.jquery.com .
Google Web Toolkit
Another popular and extremely powerful JavaScript tool is Google Web Toolkit
( GWT ). First of all, GWT is not a mere library that provides a handful of abstractions
on top of JavaScript, but rather a full blown development toolkit that uses the Java
language (which itself comes with all of its benefits), then compiles and translates
the Java code into highly optimized, browser-specific JavaScript code.
Search WWH ::




Custom Search