ORLANDO -- Effective Ajax development means knowing know when to avoid the technology as much as it means knowing when to implement it. Think back several years, to the days of minute-long, browser-breaking multimedia introductions to Web sites, and the consequences are not hard to imagine.
One way to encourage developers to sidestep such behavior is to provide controls that plug right into existing applications and also provide functionality that clearly and immediately benefits end users.
That is one aim of Microsoft's ASP.NET AJAX Control Toolkit. The toolkit works alongside ASP.NET AJAX, the framework Microsoft has developed for adding Ajax to ASP.NET 2.0 applications.
Both the framework and the toolkit are free on CodePlex. Source code is available as well. The intention, according to David Anson, one of the Microsoft developers who works on the ASP.NET AJAX Control Toolkit, is promoting a sense of community involvement.
"You can take whatever we've done, source code included, and use it in your Web site however you want. Feel free to go right ahead," Anson said at the DevConnections conference here in Orlando.
Anson illustrated his point by calling up an ASP.NET 2.0 application -- in this case a photo browsing app -- and, in a 15-minute span, adding several different ASP.NET AJAX controls to it.
First he used the UpdatePanel, which uses an XMLHTTP request to perform a "behind-the-scenes" postback. Then he added a TextBox Watermark (to let users know where to enter a search term), a HoverMenu (a Web service displaying data about each photo), and an UpdatePanel animation (so users would know the page was loading).
"Suddenly this is quite a bit more interactive and informative as well," Anson said. "That was pretty nice and we didn't have to change our site very much."
The ASP.NET AJAX Control Toolkit contains about three dozen controls and extensions. Developers can also roll their own, with the aid of templates for toolkit-enabled sites, for component projects and for components themselves. Templates are written in both Visual Basic and C#.
When writing custom components, Anson said controls work best for very specific HTML shapes, such as accordion tabs, while extenders are best for simpler shapes, such as TextBoxes.