Advanced Topics / AJAX
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
We now get to AJAX. AJAX is short for Asynchronous JavaScript and XML. You can see how all of these technologies that I'm covering in this section of the tutorial sort of interrelate. When they do they form this technology called AJAX. The term AJAX has actually come to represent a broad group of Web technologies that can be used to implement a Web application that communicates with the server in the background without interfering with the current state of the page. In the article that coined the term AJAX, author Jesse James Garrett, explained that the following technologies that I've listed here are required for the technology to be considered AJAX and that is: XHTML and CSS for presentation; the DOM or Document Object Model for dynamic display of and interaction with data; XML and XSLT for the interchange and manipulation as well as the display of data - XML for the interchange and manipulation and XSLT for the display of the data; XMLHttpRequest object for asynchronous communication; and lastly JavaScript to bring these technologies together. You can get a glimpse of AJAX in action by visiting my website: www.geekmanuals. I have here an animated pull-down menu driven by AJAX. Classic AJAX involves writing ad hoc JavaScript on the client, that is, the browser. However, JavaScript is not the only client-side scripting language that can be used for implementing an AJAX application. Other languages such as VBScript are also capable of the required functionality to work with AJAX, however, JavaScript is the most popular language for AJAX programming due to its inclusion in and compatibility with the majority of modern Web browsers. With AJAX, Web applications can retrieve data from the server asynchronously in the background. This means they won't interfere with the display and the behavior of the existing page. The use of AJAX techniques has led to an increase in interactive or dynamic interfaces on web pages like on my website right here. Data is usually retrieved using the XMLHttpRequest object. Despite the name the use of JavaScript and XML is not actually required, nor do the requests need to be asynchronous. Some of the advantages to using AJAX on your web pages include user simplicity, increased interaction, speed, functionality improvements, backend efficiencies, styling, less bandwidth usage and better form validation. Examples of user simplicity would include, if you've ever had to click on a link only to have the page reload and then you end up on a new page with the content you requested somewhere way down below the page, well with AJAX you can click a link and then you simply load the content right there below the link, no scrolling required. With AJAX interaction queues can be made slicker, smoother and faster. You don't have to reload the page to tell the user that something has happened that affects him or her in any way. AJAX makes changing content fast and simple and it usually looks pretty good. Regarding backend efficiency slowback and processing, or processing happening on a slow server, results in about 60 percent of page load problems, but with AJAX processing you simply replace the processing element with a little AJAX loading GIF and then everything runs a lot smoother. In terms of styling there's probably nothing better than smooth transitions between user interaction and the server reaction. This is probably what makes AJAX one of the nicest effects available without having to go to the extreme of using more complicated Flash. AJAX is easier to understand and most of the work can be done in the server-side language of your choice. Regarding bandwidth usage, because pages do not have to completely reload you're really using less server bandwidth when you employ AJAX and regarding Form Validation, AJAX gives you Form Validation that is more instant, seamless and unobtrusive than you can get in HTML. Now there are, as you can read here, drawbacks to using AJAX, namely pages are harder to develop if you utilize AJAX; pages do not automatically register themselves with the browser's history engines, so if you go and use the back button or the history tool not all those pages will be found; dynamic web page updates also make it difficult for a user to bookmark a particular state of the application; search engines have trouble indexing AJAX content - that's a big drawback right there. Many mobile phones, PDAs and screen readers may not have the support for required technologies to display AJAX. And Ajax-powered interfaces can lead to longer response times or additional hardware needs and finally, user interfaces can be confusing or behave inconsistently when normal Web patterns are not followed because you can really do some creative things with AJAX. You may confuse your users because they're a little bit too new and novel and creative. In conclusion, AJAX is smooth and sleek and neat and precise, too. Using it can make your websites more professional looking and also more enticing to visitors but do use it sparingly in the right place and in the right way. It's not meant to be flashy. In this case less can be more here.
Tutorial Information
| Course: | HTML 4/5 with CSS |
| Author: | James Gonzalez |
| SKU: | 34077 |
| ISBN: | 1-935320-93-9 |
| Release Date: | 2009-12-31 |
| Duration: | 10.5 hrs / 142 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 