Ajax

From HaFrWiki
Jump to: navigation, search

Ajax is the hype or the buzzword today for developers. Nowadays Ajax is using XMLHttp Requests (XHR) to communicate between the Client and Server. A lot of Ajax implementation/frameworks are available.

Google provides programmers with Ajax implementation, which are wrappers around their own product. See Google Ajax.

The winner seems to be jQuery & Dojo. jQuery provides:

  • jQuery, a JavaScript library which does a lot of cross platform browser support.
  • jQuert AJAX, an AJAX implementation based on the jQuery library.

This combination seems to be nowadays the road to follow. A lot of information on this page may be deprecated since the first version has been made.

Dojo:

  • Very fast
  • Nice widgets.

See for a comparison between these two on Stack-Overflow Which JavaScript framework?

There are a lot of reasons to choose for 1 of the twos above:

  • Dojo seems difficult to learn and get started with, especially in comparison with the more popular jQuery.
  • Dojo has long been criticized for its incomplete, scattered, and outdated documentation.


Professional choice[edit]

Currently the best choice for AJAX seems to be jQuery AJAX [1].
According to W3Schools: With the jQuery AJAX methods, you can request text, HTML, XML, or JSON from a remote server using both HTTP Get and HTTP Post - And you can load the external data directly into the selected HTML elements of your web page! Without jQuery AJAX can be a bit tricky.'

jQuery AJAX[edit]

The jQuery Foundation is a non-profit trade association dedicated to supporting development of the jQuery Core, jQuery UI, and jQuery Mobile projects; providing jQuery documentation and support; and fostering the jQuery community. The jQuery library contains the following features:

  • HTML/DOM manipulation
  • CSS manipulation
  • HTML event methods
  • Effects and animations
  • AJAX
  • Utilities

If you don't want to download and host jQuery yourself, you can include it from a CDN (Content Delivery Network). But always be sure to work with the latest version of the library. Also use the developer version for developers testing.
Both Google and Microsoft host jQuery tutorial.

<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
</head>

To learn jQuery look at:

Dojo[edit]

Another framework is Dojo [2]. It has the following features/claims:

  • Extremely Small and Fast
  • Refactored Microkernel
    The core of Dojo has been completely refactored as a set of lightweight independent modules that can be used via the new Dojo lightweight (3.8kb) AMD loader.
  • Asynchronous Loading
    Only load the capabilities you need and no more, all asynchronously and FAST!
  • Dojo documentation is not very well at the moment.

The Dojo web site offers 3 primary documentation sections to get started, all created via extensive community contributions and efforts.

One of the reason for choosing Dojo maybe the charts and stats options:

Google Ajax[edit]

The proof Ajax is more than a hype, Google has also created Ajax wrappers around their products. See:

Miscellaneous info[edit]

See also[edit]

top

Reference[edit]

top

  1. jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.
  2. Dojo Toolkit, The text and links used in the paragraph are from the Dojo website.