views:

352

answers:

7

Developers and management tell me that they want to move away from using asp.net ajax because it is big and cumbersome.

I kind of agree, but I don't want to do all the javascript heavy lifting myself. Eventually I also want to introduce jQuery. I'm guessing right now it will also be a problem.

Is there a good post somewhere outlining pros/cons of using ajax.net vs your own custom libraries?

+16  A: 

If

they want to move away from using asp.net ajax because it is big and cumbersome

Then JQuery is the exact answer for this.

J.W.
Especially when combined with ASP.NET MVC
Marc Gravell
…and ASP.NET MVC comes delivered with JQuery.
Spoike
+1  A: 

I don't know about a post, but you can easily implement AJAX without using any kind of library (if what you mean is really AJAX, and not all the helper stuff that gets lumped into AJAX like field validation, DOM abstraction, etc).

This page taught me all I needed to know about real and true AJAX. http://www.hunlock.com/blogs/AJAX_for_n00bs

Matt Dawdy
There is Ajax and then there is MS Ajax, the first being the idea...I totally agree with what you said
JoshBerke
Actually, you've got AJAX, then you've got tons of other things that get lumped into AJAX. MS's tools give you tons of good stuff, and jQuery gives you even MORE good stuff...but none of that crap is really AJAX. It's "Web 2.0"...for lack of a better term. And we ARE lacking!
Matt Dawdy
+4  A: 

You need to convince your manager of something. That's an art form you learn to perfect :-)

Show them equivalent bits of code for doing a simple function in ASP, straight JS and jQuery, and choose a sample that ensures the straight JS version is large and hideous.

Tell them you fully agree with their concerns on ASP (butter them up, that always works well) but that you have concerns on quality and timeliness of delivery (this will scare the living daylights out of any manager).

Your carefully selected samples should convince them that they should move from ASP to jQuery rather than ASP to straight JS. Or, worst case, they'll stay with ASP for a bit longer.

Both these sound acceptable to you since they don't involve heavy lifting.

I like to take my cues from the "Yes, Prime Minister" show where Sir Humphrey once commented (paraphrased):

Give them three options, two of which can be shown to eventually culminate in World War III, then let them think about it for a bit.

paxdiablo
Brilliant post!!
Aaron
+1  A: 

Microsoft just added jquery intellisense to VS2008. That should answer your question. However, Google hosts several right here. http://code.google.com/apis/ajaxlibs/ All it takes it one line of code in your webpages.

Mike
+1  A: 

Even if you use jQuery (which I highly reccomend), unless you go to the extent of creating pages that just return data for your each your ajax requests, you are still going to need(want) a framework on the server side also.

I think the main complaint with asp.net ajax is all the scripts it includes on the client side(script helpers). The update panel also get's abused since they are so easy to make use of.

I found that with using jQuery, you can still use asp.net ajax WebMethod()'s but use only jQuery to make the calls to them.

This feels like a best of both worlds to me. You get to use the WebMethods and not mess up your project with a-page-per-function, but you can skip including any of the Microsoft javascript libraries on the client side.

More info on calling WebMethod's directly from jQuery here

Corey Downie
+2  A: 
  • JQuery Is lightweight (19KB)
  • Cross browser compatible
  • have a great UI library
  • Plenty of plug-ins
  • and a good documentation
  • good support for ajax
Yassir
+1  A: 

Have a look at ASP.NET MVC. It addresses the concerns of your management in three areas:

  1. It drops the used of webforms, arguably the biggest reason for ASP.NET's bulk. Without webforms you are coding "closer to the metal" and so you have tight control over your code and user interaction while still having a framework in place for state management.
  2. It uses a well defined, easy to follow, folder structure to enforce the Model-View-Controller (MVC) model. Unlike webforms, which was supposed to separate business logic from user interaction, the MVC model strongly encourages the developer to make that necessary separation. It is the separation, more than just about anything else, that keeps your code from becoming cumbersome.
  3. It is well integrated with jQuery. On the view side, with the exception of some helper classes to get your data into your view efficiently, you're working with pure HTML/CSS/JavaScript. ASP.NET MVC officially supports jQuery and is the preferred way of integrating JavaScript.
CLaRGe