Ajax development: The what, how and when, continued -- Five tips for getting started

Most experts agree that the first steps forward in Ajax development should be small ones. Here are five tips for introducing Ajax to your Web applications.

Part One of this series examined where Ajax development has come in the year since the term has been coined, how

and where Ajax should grow in 2006 and what type of UI does, and does not, work with the technology.


Whether Ajax spells the end of the traditional Web application as we know it, or merely offers a way to enhance those apps, it is safe to say the technology is not going anywhere.

Most experts, whether they focus on .NET or Java, commercial products or open-source endeavors, agree that the best step forward with Ajax is a small one.

SearchVB.com recently asked Eric Pascarello, co-author of the book Ajax in Action and an expert on both .NET and JavaScript, what developers should take into consideration when they want to start using Ajax. Pascarello offered five tips.

Start small, then review your progress. Rather than conducting a complete Ajax overhaul of your app, Pascarello said, "Start with a double combo or an AutoComplete component and work your way up from there. That will give you a good feel on how your users handle the changes and also gives the rest of the developers on your team time to learn the new architecture."

Don't always rely on the server. If users get chunks of data from the server that do not need refreshing, then build your app so that static data caches on the client, Pascarello recommended. To do this right, you'll have to test your app on a variety of security levels, browsers and operating systems, he added.

More on Ajax development

Reference: Ajax Learning Guide

Dynamic Double Combo -- Chapter 9 of Ajax in Action by Eric Pascarello

News: Ajax development: The what, how and when

Make sure the server can handle the load. Single Ajax refreshes are smaller than the typical http refresh, but if dozens of users are performing the same function, that's a lot of pressure on the server. As an example, Pascarello cited 100 users typing 10-letter words into an AutoComplete field. "[T]hat can be 1,000 requests in a short period of time," he said. "Just because it is [a] small [request] doesn't mean it still cannot cause the server to come to a crashing halt."

Let users know something is happening. Ajax application refreshes are silent -- a page's URL does not change once the information has been updated. As a result, users expecting a new URL, as they would see in an app making a full http request, are liable to click a button or icon several times, convinced that will bring about the intended result faster. Users need a visual cue that the refresh is in progress, Pascarelo said. "It can be as simple as a line of text or a loading image," he said.

Above all, know how Ajax works. The "x" in Ajax stands for XMLHttpRequest, which lets a Web app send http requests to the server without refreshing an entire Web page. That, combined with DHTML, gives Ajax its rich GUI capabilities. "See how it works at the basic level. Without the basic knowledge of this, you cannot architect a good solution," Pascarello said.

A good starting point in a developer's Ajax education effort is our Ajax Learning Guide. This resource offers a variety of articles and tutorials about Ajax, including Atlas, Microsoft's upcoming tool for blending Ajax and ASP.NET technology.

This was first published in March 2006

Dig deeper on ASP.NET and Ajax development

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close