2

What is the difference between AJAX and jQuery. Does both of them do the same thing.If they do what are the pros and cons of each. I'm trying to learn ASP.NET AJAX but not sure if jQuery offers the same features??

Thanks.

2
  • 2
    MS AJAX is progressively being replaced by jquery so you may consider it as obsolete. Commented Nov 21, 2010 at 17:53
  • @user , with jquery the UI is totally decoupled from UI controls. Commented Nov 21, 2010 at 18:58

1 Answer 1

4

MS AJAX library and jQuery are both decent JavaScript libraries that are equally capable of fulfilling the UI needs for an ASP.NET application. The way that each is organised and the approach taken is quite different between the two -

jQuery is based largely around the $ function - it is the constructor for objects that wrap elements matching a given selector, plugins are provided by extending the function prototype and utility functions are provided as properties on the function object.

The Microsoft AJAX library on the other hand takes the approach of extending the prototype of some of JavaScript's native objects and providing useful functions organised within namespaces that should feel familiar to .NET developers. Many of the idioms of programming in your favourite .NET language have been graphed into a JavaScript library.

Having used both considerably, I personally prefer jQuery. For me, it feels more intuitive to use and get things done. The development of jQuery is much more active (in fact I believe that the MS Ajax library will have no more development put into it by Microsoft, with their focus being more on jQuery now as the preferred client side solution) and is more lightweight than MS Ajax. I'm comfortable with the fact that JavaScript is a completely different beast to C# .NET programming and I like to embrace that difference and follow the idioms and conventions that are established for the language.

Sign up to request clarification or add additional context in comments.

2 Comments

I just want to add on extra point, Is MS ajax library not heavier than jquery??I think it adds lot of markup code which can increaase the page size.
@gov- yes, MS AJAX library is larger, as in more bytes sent down the wire, than jQuery.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.