Create Rich Web Apps with AJAX: Sidebar1: Why use AJAX?

Asynchronous JavaScript and XML (AJAX) is one of the most talked about topics in the world of Web development. But is AJAX really all it's cracked up to be? If you need to provide end users with a richer Web interface that doesn't require entire pages to be reloaded each time they perform an action, then AJAX might fit the bill for you. By using AJAX, you can minimize full-page postback operations and update parts of a page instead as users click buttons and other controls. This provides your Web applications with more of a desktop-application feel.

AJAX is all about JavaScript. It relies on a special object called XMLHttpRequest that's built into all major browsers (FireFox, IE, Safari, Opera, and so on). You use this object to send data to and from a server directly from a page. Data returned from a server can be updated in a page using Dynamic HTML (DHTML) techniques. Many frameworks such as the ASP.NET AJAX Extensions simplify using the XMLHttpRequest object and eliminate cross-browser issues that normally occur if you write all of the code on your own.

Adding AJAX functionality into Web pages has many pros, but also comes with its own set of cons. AJAX relies heavily on JavaScript, which adds to the learning curve for developers new to client-side Web development. Several other technologies, such as Cascading Stylesheets (CSS) and the Document Object Model (DOM), often come into play, as well. In addition to the learning curve, additional complexities, such as security and debugging, can be factors. While cons certainly exist, the pros associated with AJAX cannot be denied. AJAX allows users more efficient access to data and allows data to be returned and displayed more quickly due to the ability to update a part of a page as opposed to the entire page.

You can also integrate AJAX functionality with newer technologies such as Microsoft's Silverlight to create extremely rich and attractive user interfaces that display data in creative and intuitive ways to users. You can find one example of combining AJAX functionality with Silverlight on my Web site.

comments powered by Disqus

Featured

  • Mastering AI Development and Building AI Apps with GitHub Copilot

    Two Microsoft experts explain how GitHub Copilot is evolving from a coding assistant into a broader platform for building, customizing and testing AI-powered developer workflows.

  • VS Code 1.123 Adds Agent Session Sync, 1M Context Windows

    Microsoft released Visual Studio Code 1.123 on June 3, adding agent-focused features, larger model context support, integrated browser updates and a new delay for some automatic extension updates.

  • Copilot Billing Shock Hits Developers

    Developer complaints about GitHub Copilot's new usage-based billing model have centered on unexpectedly rapid AI credit consumption, and neither GitHub nor Microsoft has responded directly to the backlash, though they have previously published guidance to lessen model usage costs.

  • Hands On with GitHub Copilot App Technical Preview: Turning a Blazor Issue into a PR

    GitHub's brand-new Copilot desktop app, in technical preview, handled a small Blazor issue from planning through pull request creation, but the hands-on test also showed why developers still need to verify agent work in the running app before merging.

Subscribe on YouTube