|
|
Registered tutorials: 501 Registered Users: 33128
|
|
Rating: 5 out of 1 votes cast
Category: Ruby on Rails
|
Crossing borders: Ajax on Rails
Abstract: This article walks through a couple of simple Ajax examples and, along the way, shows you what makes the Ruby/Ajax combination so successful. In the next article in this series, I'll dig into JavaScript as a programming language.
Ajax defined Ajax stands for Asynchronous JavaScript + XML. Jesse James Garrett, an information architect, came up with the term in 2005 to describe a technique that had seen niche use for nearly a decade (see Resources). Ajax use then exploded, with a simultaneous growth in libraries, popular Web sites, and literature. Ajax redefines the basic browser's usage model, which was to render a page at a time. Ajax lets the browser communicate with the server between page updates. The upside is a richer user experience, at the cost of complexity. Ajax works by sending XML between the client and server using JavaScript client-side libraries. Ajax developers can send asynchronous requests from the client at any time, so user interactions can continue while the server processes the requests. This is the flow of an Ajax request: - An event, such as a user mouse click or a programming timer trigger, initiates a JavaScript function.
- The JavaScript function creates a request for a partial page rather than a full page. JavaScript then sends that request to the Web server via HTTP.
- This HTTP request invokes a script on the server, such as a Rails controller method or a Java™ servlet.
- The server script creates an XML document and returns it to the client.
- Upon receiving the result, the client asynchronously creates, updates, or deletes part of the Web page, such as a list element,
div tag, or image.
|
Reviews:
Rate and Review This Site
No reviews yet
Statistic Information About this Resource:
| Total Hits: |
252 |
| Unique Hits: |
204 |
| |
Daily |
Weekly |
Monthly |
| |
Unique |
Total |
Unique |
Total |
Unique |
Total |
| Average |
0 |
0 |
0.4 |
0.5 |
4.6 |
5.6 |
| Current |
0 |
0 |
0 |
0 |
0 |
0 |
| Previous |
0 |
0 |
0 |
0 |
4 |
5 |
| Nov 29 |
0 |
0 |
2 |
2 |
2 |
3 |
| Nov 28 |
0 |
0 |
0 |
0 |
8 |
9 |
| Nov 27 |
0 |
0 |
1 |
2 |
8 |
11 |
| Nov 26 |
0 |
0 |
0 |
0 |
11 |
12 |
| Nov 25 |
0 |
0 |
1 |
1 |
2 |
2 |
| Nov 24 |
0 |
0 |
0 |
0 |
0 |
0 |
| Nov 23 |
0 |
0 |
0 |
0 |
7 |
10 |
| Nov 22 |
0 |
0 |
0 |
0 |
4 |
4 |
| Highest |
3 |
6 |
8 |
10 |
23 |
27 |
|
|
|
Script Execution Time: 1.03671 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2
|