Taking a shine to AJAX
For anyone who works in web application development using Microsoft technologies, the recent announcement about the firm’s Atlas extensions for Visual Studio is going to be of interest, because these (beta) add-ons enabled developers to make a start on using AJAX technologies. These extensions had their limitations: although you could drag and drop components, wiring them up required a fair amount of hunting round among their methods and properties to work out what code you needed to write. None of this was easy enough, and looming in the background was always Microsoft’s warning that it all might change in future versions.
Sure enough, things have now changed and developers are complaining in the forums that they’ll have to rewrite their applications because Microsoft has “broken” things. I’m prepared, uncharacteristically, to defend Microsoft in this case by pointing out that anyone who uses a pre-beta technology for live application development must expect some grief as that technology evolves. None of us wants to be stuck with bugs and hacks that a system’s authors weren’t allowed to fix because users had prematurely started applying it commercially. In our fast-moving industry, we often have to use beta software just to stay abreast of the game, but we must stay aware of the problems this can cause, especially with pre-betas. The rule is Caveat Downloader.
What Microsoft has done is to embrace the AJAX name within its Atlas extensions, so that now the server-side Atlas technology is to be called ASP.NET 2 AJAX Extensions, while the client-side components – which can interface to most server-side technologies such as PHP or ColdFusion, as well as ASP.NET – are to be called the Microsoft AJAX Library. Finally, the Atlas Control Toolkit is now renamed the ASP.NET AJAX Control Toolkit.
Were this all just an exercise in market rebranding, I wouldn’t bother to mention it in this column, but the technology has in fact matured to a point where it’s now very usable and will produce excellent web applications with comparative ease. All of it will be incorporated into the next release of Visual Studio, which currently goes under the splendid name of Orcas and is now available in beta. However, you can also download the AJAX extensions into Visual Studio 2005 or Visual Web developer 2005: simply go to http://ajax.asp.net and follow the instructions.
What’s so special about these extensions that they can get you into trouble with your colleagues merely by typing their name incorrectly? Well, by simply adding a few lines of code, you can define which areas of your web page will get redrawn, based on some other area changing. For example, if your user selects from a list of items held in a grid, you might choose to redraw only the area of the page that displays product details for the selected item.
To do this, first add a line that calls the AJAX script manager: