views:

3134

answers:

4

A lot of discussion are going on with jQuery and MS Ajax after the jquery integrated news.

I'm currently in the process of convincing my team to consider jQuery, but I'm not a pro on either of them.

I really want some good comparisons between jQuery and MS Ajax "Client" library, as my team is arguing that we can what jQuery can if we just use raw ms ajax client library, and jQuery seems to just have a better selector.

Can someone give some good insights of why use jQuery than MS Ajax in some scenarios? if better performance concerns?

Thank you!

+7  A: 

I use both. I think these two are for different use cases -- MS AJAX is for communicating some data from server to client during the initial load (ScriptControl), and for creating the initial control-element associations. Also the web service wrappers are extremely useful for data AJAX, and wrappers depend on MS AJAX library.

And jQuery is for DOM traversal/modification after the page has loaded. MS AJAX can do this, but in much more complex way than jQuery. Also, jQuery as a framework gives to access to a ton of plugins -- client-side scripts and controls, such as menus/trees/etc.

Andrey Shchekin
While I don't disagree with your hypothesis, your evidence is not entirely valid. jQuery also has client-to-server AJAX functionality which is definitely easier than MS AJAX. MS AJAX also exists largely to support a suite of controls that overlap the ones you cited for jQuery.
Rex M
Well MS AJAX client-to-server actually generates "strongly-typed" web service wrappers, and I do not see doing the same in jQuery as being 'easier' -- the first example, you would have to actually hardcode a web service url into script or reinvent it's generation into page.
Andrey Shchekin
As for controls, except for Calendar which is the best one I have ever seen, AJAX Control Toolkit is largely not interesting/flexible enough to be compared with jQ solutions.
Andrey Shchekin
+4  A: 

SO Question: Pros and cons of MS Ajax vs. jQuery in an ASP.NET MVC app?

Ben Alpert
+2  A: 

Microsoft is now shipping jQuery as part of Asp.net MVC. They will not be using jQuery internally but is promoting it. Have a look at this article.

Hemanshu Bhojak
A: 

We need to ask - Why do we use ASP.NET? Mostly because of the controls it provides. If jQuery provides controls as plugins then there is no need for ASP.NET or Microsoft AJAX toolkit too. If we design our site to be based on pure HTML pages, use jQuery to control dynamic portion of the HTML page and finally use WebService to store/retrieve information from database then we totally eliminate ASP.NET ASP.NET slows down the site as your request goes through a lot of stages to reach the compiled ASPX page, which is then parsed then the codebehind and designer files are merged then finally the HTML is rendered.

Someone might argue then Microsoft provide MasterPages. Think again about using MasterPages, as they too slow down your site. At every page request the entire MasterPage is rebuilt. Instead try to use IFRAMES. Have your starting page with all your navigation controls with the content area as an IFRAME. This content area should load the proper HTML page based on user menu click.

Azhar Khan