OSCON 2006: Ajax + .NET = Atlas

This week, Kevin Yank is reporting from OSCON 2006 in Portland, OR.

After a from-scratch introduction to AJAX, Christian Wenz gave a demo-heavy talk (my favourite kind!) showing off many of the features of Microsoft’s Atlas toolkit for building AJAX applications in ASP.NET.

At its most basic, Atlas makes it trivial to write client-side JavaScript code that sends requests to ASP.NET Web Services, but things get really interesting once you start to combine AJAX with ASP.NET’s other features.

The Atlas UpdatePanel is a great way to “ease in” to AJAX, while relieving one of the major annoyances of plain ASP.NET. By wrapping a portion of your ASP.NET page in an Atlas UpdatePanel, that portion of the page can perform postbacks (round-trips to the server to update the UI in response to user input) over AJAX, without having to reload the rest of the page. Wenz showed off how simple it was to embed ASP.NET’s postback-heavy Calendar control within an UpdatePanel to cut out all those annoying page reloads.

Wenz then went on to build a simple autocomplete demo in the same vein as Google Suggest. This was surprisingly easy to do, thanks to Atlas’s ability to extend existing ASP.NET components (like the TextBox) with AJAX functionality. I was gratified to see that this degraded gracefully back to a plain TextBox when JavaScript was disabled on the client side.

A difficult problem that is not handled very gracefully by other AJAX toolkits is that of cross-domain requests (see my report on a previous talk on this subject), and Atlas actually has a pretty neat solution to this: a framework for building server-side proxies for calling remote services from the client side. This approach to solving the cross-domain request problem is not always practical, but at least Atlas has a solution, while other frameworks often leave it up to the developer to build one from scratch.

Finally, Wenz rolled out the sure-fire crowd pleaser: an AJAX map control provided by Virtual Earth. As one would expect, this was trivial to do.

Some other pointers provided by Wenz: the Atlas Control Toolkit, a community-driven effort to build new controls and extenders for the Atlas framework; an effort underway to port the server-side portion of Atlas to PHP.

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • http://www.dotcomwebdev.com chris ward

    Wenz then went on to build a simple autocomplete demo in the same vein as Google Suggest. This was surprisingly easy to do, thanks to Atlas’s ability to extend existing ASP.NET components (like the TextBox) with AJAX functionality. I was gratified to see that this degraded gracefully back to a plain TextBox when JavaScript was disabled on the client side.

    Yes, the ATLAS-enabled textbox will degrade gracefully, but still…
    ASP.NET applications fail to work with Javascript disabled.

    This is due to the way they’ve used javascript to handle the way they post forms to the server.
    I really wish they’d fix this.

  • n

    ASP.NET applications do no fail to work with javascript disabled.

    Some functionality will fail, but if you understand what is happening under the hood and you want to make it right – you can.

    You can build an application on asp.net which one need anything but plain html, it will just take a bit of manual labour and knowledge.

  • Ahmet Kaymaz

    I make textbox disabled=true in client side. Then, when I get to the server in post action, these objects lose their value.

    Ahmet Kaymaz
    Asp.Net,C#, VB.NET, SQL, Oracle,SQL Server 2005