The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Getting Started with AJAX on ASP.NET

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brendan Tompkins

Posts: 158
Nickname: brendant
Registered: Apr, 2005

Brendan Tompkins is .NET Developer and founder of CodeBetter.Com
Getting Started with AJAX on ASP.NET Posted: Jan 26, 2006 1:34 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Brendan Tompkins.
Original Post: Getting Started with AJAX on ASP.NET
Feed Title: Brendan Tompkins
Feed URL: /error.htm?aspxerrorpath=/blogs/brendan.tompkins/Rss.aspx
Feed Description: Blog First. Ask Questions Later.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Brendan Tompkins
Latest Posts From Brendan Tompkins

Advertisement

I’m nearly done with a new version of WSMQ that runs on ASP.NET 2.0 and contains a nice snazzy new AJAX interface. Since along the way I learned a little about this new fangled technology, I thought I’d post a bit of information I’ve gleaned about the different options that you have currently for developing AJAX enabled web apps on ASP.NET.  

This Post is like, so September 2005.

Yes, I know, you’re probably already really familiar with AJAX by now, and may have even decided how you can most easily add AJAX to your apps.   If this is so, you may want to skip this post and head directly over and stream the new Belle & Sebastian album or  decide for yourself if this is really proof of aliens landing in Iowa in 1917 or an elaborate hoax (remind me to tell him that I think I saw Benjamin Stove at a .NET user group meeting…) .  Or just sit there in amazement and ponder how this guy made $1M selling ads on one page.

Oh, you’re still here.. Okay, well, so you you may be wondering how to get started implementing AJAX within your own applications.

What is it AJAX Again and what does it have to do with ASP.NET?

You know, that Live.Com Google Maps stuff. Basically AJAX is dynamic web content without the postbacks. To implement it, however, it requires more than a few technologies on top of ASP.NET to get going.   Specifically it requires manipulating the Document Object Model through JavaScript to dynamically display and interact with the information presented, and the use of the the XMLHttpRequest object to exchange data asynchronously with the web server.   So when you’re faced with implementing AJAX in your web apps you have to make some decisions about how much help you’re going to get with all this stuff.

There are the brave few that will decide to go it alone, and code directly to the browser’s object model. If you are interested in rolling your own scripting the browser’s XML HTTP functionality, there’s a good article here on how to do just that.  Sahil a while back posted an example on how to create a progress bar using AJAX.  The problem with this approach is that it requires knowledge of a multitude of technologies, and I’ve found this can be quite tricky to code, debug and maintain.  If you’re like me, you want to spend less and less time writing client end code and concentrating on something more re-usable.

Just the AJAX Script Libraries, Please
There’s more than a few Javascript libraries around which do the dirty work of DOM manipulation and XMLHttpRequest processing for you.  One option for deploying an AJAX app is to implement your solution based on one of these libraries. You’re still going to need to know quite a bit about JavaScript to use these libraries, but they are out there if you need them.

Prototype

“Prototype is a JavaScript framework that aims to ease development of dynamic web applications. Featuring a unique, easy-to-use toolkit for class-driven development and the nicest Ajax library around, Prototype is quickly becoming the codebase of choice for web application developers everywhere.”

Sarissa 

“Sarissa is a cross-browser ECMAScript library for client side XML manipulation, including loading XML from URLs or strings, performing XSLT transformations, XPath queries and more. Supported: Gecko (Mozilla, Firefox etc), IE, KHTML (Konqueror, Safari).”

ASP.NET Ajax Implementations So if what you really want to be doing is concentrating on business logic, application design and creating loosely coupled applications that your organization can reuse and build upon,  you don’t want to be wasting a ton of time coding up in the UI. Especially since you’re probably going to have to rewrite the UI again anyway when the next new presentation technology comes out.   The fastest way to implement AJAX, given this, is to use an implementation that quickly plugs into the ASP.NET framework and allows you to write the least amount of custom AJAX code. There are a couple of alternatives for doing just this.

Ajax.NET Professional

This is a free, open source AJAX library is written by Michael Schwartz.  From what I can tell, it seems to be very poplar, although the project seems to have branched a bit and it’s kind of hard to tell where it’s headed.  There’s a good MSDN article here that will help you get up and running using Ajax.NET.

JAAJAX

Jay Kimble’s implementation based on the Sarissa AJAX library. Uses method attributes to declare AJAX-accessible server code.  Jay can tell you more, in fact he’s right next door..

ASP.NET “Atlas”

ASP.NET “Atlas” is a package of new Web development technologies that integrates an extensive set of client script libraries with the rich, server-based development platform of ASP.NET 2.0. “Atlas” enables you to develop Web applications that can update data on a Web page by making direct calls to a Web server — without needing to round trip the page. With “Atlas”, you can take advantage of the best of ASP.NET and server-side code while doing much of the work in the browser, enabling richer user experiences.

Microsoft’s AJAX offering is pretty nice.. It was demo-ed in the PDC 05 keynote which I missed unfortunately… Comes with a Visual Studio web site template, and quite a large feature set. I managed to get a simple AJAX web form implemented in a matter of minutes.  Scott Guthrie has a great walk through here for creating a quick Atlas app.

ComponentArt’s Callback

This is the AJAX implementation that I’m most familiar with. It’s pretty sweet. “Adds cutting-edge AJAX (Asynchronous JavaScript and XML) functionality to the other components in the Web.UI suite and also "AJAX-enables" virtually any ASP.NET control!”

Telerik’s Callback Suite

“r.a.d.callback is a suite of AJAX-enabled UI controls, which allow you to update page content without postback and loss of scroll position. The short response time combined with the smooth interface transitions results in superior users experience and level of interactivity, which can only be found in desktop applications.”

Is that it?
Heck no! I’m sure I’ve failed to mention more than a few technologies that are out there. If you know of any, please post them via a comment here. 

Good luck!

Brendan

Read: Getting Started with AJAX on ASP.NET

Topic: Death of a Star Artwork Previous Topic   Next Topic Topic: [Podcast] Digital Lifestyler unter sich ...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use