AJAX and JavaScript Frameworks

Doing more with less

Software frameworks are very helpful. We have looked at the high level at some things you might want to do with JavaScript. We have looked at the low level at how to build things in JavaScript. Now we will look at how to save ourselves work using JavaScript.

If you program enough in a particular language in a particular context, the same problems keep showing up. As a result you build the same code solutions over and over again. Code libraries help you avoid re-inventing the wheel over and over again.

Blocking/Synchronous vs Non-Blocking/Asynchronous Loading

What is AJAX, anyway? Why should you care about Asynchronous AavaScript And XML?

Updating the Display on the World Wide Wait

Make them talk about refreshing small parts of a Web page vs reloading the whole thing. What does that way of thinking make possible? What is an RIA?

APIs

Take a quick look at some of these APIs made freely available which use AJAX to provide services to Web page displays:

An Example Library: prototype.js

The prototype JavaScript library tries to make developing dynamic web applications easy. prototype is known as a library because it provides implementations of common functionality for use and re-use, like a library lets people re-use books. (Download the software from conio.net or view the script source, or look at documentation at the script.aculo.us site)

In-Class Activity

  1. doing things the hard way: revisit the JavaScript Non-Blocking (AJAX style) Loader page from earlier in the week. Select "View JavaScript" and walk through how the code works
  2. using a library: visit the prototype quick guide now, and look at the AJAX support. Other features to notice include:

Now take a look at a simple demo.


Valid XHTML 1.0 Valid CSS! Pastafarian Flag

Last modified: 10 Mar 2008 10:21:43 AM