CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Darrell Norton's Blog [MVP]

Fill in description here...

So what does AJAX mean to your Business apps?

Rick Strahl (ASP.NET MVP) has a great article called Past the AJAX Hype - Some things to think about. It's about the applicability of AJAX in web-based business applications.

"AJAX is hot and people are falling all over themselves to be associated with this technology. As happens so often in this field, some new technological feature (in this case not even new) gets hyped way out of proportion and the press goes wild. Oh and the trendy developers and IT guys go right along."

Yep. And the big "AJAX Manifesto" if you will was written by, a user experience company! Even Jesse James Garrett, who penned the AJAX term, says:

"If anything about current interaction design can be called “glamorous,” it’s creating Web applications."

But how, especially if you're building business applications, do you use AJAX effectively? Rick points to a contest Tim Haines started that basically asks what part AJAX should play in business applications (the example is an online store, which Rick also sells one of, but it's applicability to corporate developers is also interesting).

One problem is that AJAX might not be considered "primary technology" yet:

"There are too many old browsers out there for one thing. XmlHttp is relatively new for Mozilla style browsers and Opera is just now getting it. Older browsers are going to be left out.  In addition, AJAX of course relies on JavaScript and if that’s turned off you are also locked out. In IE the XmlHttp object is an ActiveX object which is probably more serious because many IT departments lock out ActiveX usage on browsers completely."

Another issue, not a problem, is what does AJAX really add? Most people say "to avoid postbacks." Like Rick, I think that:

"POSTback speed is not a huge issue. But then I try to use old school efficiency in my apps and not do everything the Asp.NET brute force way which often results in humongous pages with ViewState out of control. Yup – believe it or not, but using traditional Web application development constructs like plain links, non-ViewStated grids actually result in better responding applications than all the crap ASP.NET often piles on by default."

So a properly constructed web application has less use for AJAX than maybe most people currently believe. There are some good reasons to use the technology, but much AJAX now is just "hey look what I can do" not what I should do to help the user. Data validation is a good example. Validating a zip code corresponds to the state entered would be a nice touch, especially if you can get a response back to the user that they accidentally typed in the wrong number. But these are small things which, although nice, don't merit the revolutionary hype we're seeing.

Rick also writes a pretty good argument against trying to recreate a rich-client application in the browser. Read his blog post to get the full story.


Published Aug 04 2005, 01:15 PM by darrell
Filed under:

Comments

Walter Lounsbery said:

Good timing on your post!

I just vented a bit about this at my blog. The entry is:

http://spaces.msn.com/members/waltl/Blog/cns!1pkvRvLRHOTvAhAbvB1Og9_Q!163.entry

Basically, there is a price to pay for moving important processing down to the client. The things we give up are very important in most enterprise applications. When some side effect breaks that neat check on zip code for state at the client, will you know it happened?
# August 4, 2005 11:59 AM

Darrell said:

Good point Walter!
# August 4, 2005 1:26 PM

shebert said:

I've used the Intersoft WebGrid.Net product in the past. As far as I know, they rolled their own implementation - what they are creating is fat-client ability on the browser. Given the applications role in presenting a top-down list of work priorities, this gives the user the ability to browse any number of rows without posting back to the server and introducing all the problems associate with that.

Bottom line, the users love it.

The down side is that it tends to require IIS http compression to be enabled which only works on Win2k3. You need a 3rd party tool to do compression on Win2K servers.
# August 4, 2005 2:01 PM

Tim Haines said:

# August 4, 2005 5:10 PM

Tim Haines said:

# August 4, 2005 5:13 PM

Christopher Steen said:

101 Samples for Visual Studio 2005
[Via: Paul
Ballard@nospam.com ]
A DataSet is not a Database...
# August 4, 2005 10:59 PM

Sam said:

The new bits are:

* It's now a viable solution that most modern browsers support it, as long as you're willing to require Javascript.

* Libraries like Prototype, Behaviour, and Rico are indeed relatively new. Now that it's just as easy, if not easier, to write an AJAX-ified app as it is to not, is a pretty big step forward IMO.

Every negative post on the subject seems to mention "nothing new". The truth is, there's a lot new if you bother to look.

The "hype" is that you can build more responsive applications, that look better, and are more enjoyable to use. Since when was that not enough?
# August 5, 2005 3:01 PM

Darrell said:

Sam, I don't see that you'd left a comment on Tim Haines' blog post. The question is what do you do that improves the user experience for a business application? Sure we've all seen how cool Google Maps and MSN Maps are, but bringing people to the site because it's cool is those sites' main job.
# August 6, 2005 10:14 AM

Sam said:

Fair enough:

In our Classic application we have to expire pages due to sensitive financial data. This breaks the flow of how a web-page should be though. It's just plain bad for usability.

With Ajax, and some javascript, we've created a History widget that populate's with the current page's content at the beginning of a new Ajax.Updater request. We store the old contents in an Array to avoid any duplicated elements in the DOM. So we can store your previous 10 searches for example, and you can navigate back to them *instantaneously*.

Another bit is a Help widget that scrolls to a help topic label when you pause over a page element that has a help topic associated with it. The idea is that good, accessable help can be invaluable, but if you have to look for it, then you're much less likely to use it. When you click on a help topic an Ajax driven Wiki appears in a draggable div. Since the entire site is Ajax-ified (aside from the Login page), you can navigate wherever you want without loosing the help, and without a popup.

Ajax (and when I talk about it, I'm talking specifically about the Prototype library) also makes things like Chat support really simplistic.

The Rico Library's LiveGrid is also a great example of an Ajax control that offers a lot of functionality, for not a lot of complexity. And while it doesn't do quite as much as the Intersoft Grid, it's free, and you're free to modify it. You don't have to twiddle your thumbs for days while Intersoft fails to fix a bug. Plus LiveGrid is a lot more cross-browser friendly.

And I really don't think you can underestimate the value of a good auto-complete textbox for a search form. Complex? Nope. Two lines of code.

I've been working on this application a whopping month. I'm sure that someone more creative than myself could come up with more. Either way, it's simple. Really dead simple. There really aren't any downsides. Which is why I'm frankly surprised at the large Microsoft camp backlash against Ajax. Will it solve all your problems and wash your car? Of course not. It's certainly a lot more exciting than any single ASP.NET server control I've ever seen though.
# August 6, 2005 11:10 AM

Sam said:

You know, I was probably being a bit too dramatic there. :)

"Large backlash" probably isn't fair.

I do see a lot of what I see as unjustified negativity with regards to the technology though. Just wanted to put that out there. Thanks.

As far as Tim Haines' challenge: Well, we have a little shopping cart on our site, but it's really just a customer convenience thing. It's not where the money comes in. So it's pretty basic. Expand a category (which we've done in table/sub-table fashion, but an oversized tree-view would've been much prettier/simpler/intuitive now that I think about it), mouse-over an item, modify the quantity you want, and click the buy button. Your shopping cart is displayed in a widget on the right, and you can remove items by clicking the little X next to them.

Not very inventive I suppose, but it works well, the mechanics of it stay out of your way and let you focus on buying the supplies you need, and it sticks with common web-commerce semantics. I think sometimes there's "better" things you probably shouldn't do if it makes the client have to learn something new with regards to usability.

We've tried to be careful, but I admit we may have already crossed the line with out History widget (though it is pretty obviously intuitive, and very handy if I do say so myself). :)
# August 6, 2005 6:08 PM

Tim Haines said:

# August 7, 2005 5:40 PM

Jay Kimble said:

Darrell,

This is what I was trying to say back in June (http://codebetter.com/blogs/jay.kimble/archive/2005/06/21/64955.aspx)... While I do think there are times to use the AJAX method, the truth is that I don't think that everytime is the right time to use it. The AJAX hype crowd isn't really providing this... the real fatal flaw to me is that there is a time to build a web app and a time to build a windows app (Ok, and there's a time to build a web app that mimics an existing windows app); despite all that you can do with a web app and AJAX, it still pales in comparison to what you can do in a Windows app.

Jay
# August 8, 2005 8:18 AM

darrell said:

Sam - I can definitely see the benefit in your app. I'm not saying it's not ALWAYS justified, just that it probably isn't as justified as the hypesters spin. Of course, some people totally reject AJAX and they are too far in the OTHER direction.

As always the truth lies in the middle, but all the attention is paid to the extremes.
# August 12, 2005 10:37 AM

Tim Haines said:

# August 15, 2005 7:22 PM
Check out Devlicio.us!