What is the difference between Microsoft AJAX and AJAX Pro? - asp.net

What is the difference between Microsoft AJAx and AJAX Pro?
Also, for what should I use AJAX Pro?

Microsoft AJAX is Microsoft's Ajax library that contains ready to use server controls.
AJAX Pro is a free AJAX library, that enables you to implement your Ajax calls manually. It's a little bit difficult to use then Microsoft's controls. But you have more control on the data and html elements with this library.
With AJAX Pro, you define AjaxMethods, and call them in client-side. with callback methods you get the return value and implement your logic. Whole serializable .NET objects converted successfully to javascript objects.
In Ajax Pro when you make an ajax call, only the method you defined is called. In Microsoft Ajax, whole page life-cycle called instead. Because of this, you can not change properties of controls on page with Ajax Pro. You should do it manually by callback functions in javascript. But in Microsoft AJAX, you have ability to change control's properties in Ajax methods.
My suggestion, if you have knowledge of Javascript and HTML, try Ajax Pro or JQuery for AJAX. But if you're a newbie, begin with Microsoft Ajax.

if you like the way AJAX pro works then i suggest you look at www.coolite.com, they are amazing controls, the people there took EXTJS and did all he pluming work for you and you have great fast controls, where you can also define Ajaxmethods, Webmehtods.
also if you really want to use Microsoft Ajax, then i advise using Teleirk Ajax Controls set, it is built upon Microsoft Ajax framework, but with enormous options and great support, i personally use them everyday.
hope this helps.

I think the developer of Ajax Pro went on to work for Microsoft when they built Atlas.

Related

What is the intended use case of a RadAjaxManager w/ Ajax requests versus an UpdatePanel/RadAjaxPanel

I'm confused at the benefits of using RadAjaxManager with Ajax requests versus using and UpdatePanel/RadAjaxPanel.
I have both in my solution and it is creating some havoc. What design methodologies are typically deemed best (a bit subjective I realize)
Should I only perform data operations using Ajax and all GUI updates using UpdatePanels/RadAjaxPanels?
Currently I am sometimes updating controls via Ajax manager triggered by ajax request and sometimes a control will postback entirely. If I decide to do everything via Ajax, do I have to make sure nothing ever posts back?
Check official statement. I think that mixing MS Ajax with Telerik is not a good idea.

Framework Similar to ASP.Net AjaxPro

Currently, I'm using AjaxPro Framework (http://www.ajaxpro.info/) to call any methods in my web application from the client side.
But users have some serious problems using it. (e.g success callbacks don't work in Chrome. More info about the problems could be found at: AjaxPro is working locally, but on server I am getting .ashx errors)
I'd like to replace it with a framework that can:
Call any method in my code behind. Even if it's defined in a class library. In AjaxPro I could define a method anywhere and add [AjaxPro.AjaxMethod] attribute to it. Now the method could be called in any client-side js code, even if they were in two different classes.
Doen's depend on web forms. I could replace AjaxPro with ASP.Net Ajax by using ScriptManager and Add [WebMethod] attribute to my methods and call any other method in my solution from that page method. But I'm using .ascx files and Page methods cannot be defined in .ascx files (They have to be defined in .aspx web forms).
Preferably free. (I'd like to use it in YetAnotherForum project development). But if only a paid framework is available, I'll be glad to pay for it.
Is there any other Ajax framework which has the AjaxPro functionality?
I would recommend using jQuery. It is becoming the client javascript API to use. Even Microsoft seems to be inclining towards it in favor of their AJAX client side APIs. You can call any method in a page using the .ajax method, sample here. I have never tried it inside a UserControl, but as long as the method is decorated with a WebMethod attribute, I don't see why it wouldn't work.
I believe you have a fair choice.
Look at http://ajaxpatterns.org/DotNet_Ajax_Frameworks#Lists
At my new job we're using ajaxpro, however I also have come across issues and am currently researching alternatives.

Concerns when using ScriptManager for Custom Non-Ajax Scripts

I have an application that uses various script files. These files are not used for any AJAX purposes. However, I am using MS AJAX Libraries. My goal is to use the ScriptManager to manage release and debug versions of my JavaScript. Is this the right approach? Is there a better way to handle this task?
I found that there is some additional overhead when you are using the ScriptManager. After doing some reading it looks like the ScriptManager control should only be used if you plan on sending down the AJAX library otherwise it would be advised to use the ClientScriptManager.

ASP.NET Ajax Control Kit versus JQuery

During the last 2 years JQuery has become more and more popular. So do you think, it is now time to prefer JQuery to ASP.NET Ajax in ASP.NET projects with Ajax? Has the ASP.NET Ajax Control Kit a future in the ASP.NET world?
Short answer:
If your page/site isn't currently depending on the UpdatePanel or ACT controls, definitely use jQuery and jQuery UI for any new work. That's even Microsoft's own recommendation now.
Long answer:
It's important to be clear about terminology when dealing with this topic.
ASP.NET AJAX is part client-side, but also part server-side. System.Web.Extensions came from Atlas and was eventually integrated into ASP.NET 3.5. Even if you don't use a ScriptManager or MicrosoftAjax.js, the server-side portions of ASP.NET AJAX are still very useful for creating JSON-based server-side endpoints (and those may be called directly from jQuery, with no ScriptManager).
jQuery and MicrosoftAjax.js are somewhat similar, but both do things that the other doesn't. It's not strictly accurate to say that they compete with each other; they have different goals. If your application has any UpdatePanels, you have no choice but to include MicrosoftAjax.js (which is coming in automatically with the ScriptManager). jQuery and MicrosoftAjax.js do play nice together though, so you can still use jQuery's more powerful selectors, traversals, and animations in conjunction with UpdatePanels if you must.
The AJAX Control Toolkit (ACT) is a different project, entirely separate from ASP.NET AJAX. It most directly compares with jQuery UI, not jQuery core itself. Going forward, I think we'll see most of the client-side-only AJAX Control Toolkit controls refactored as jQuery plugins (that already happened late last year, but they were pulled).
Ultimately, it's best to favor jQuery or jQuery UI over MicrosoftAjax.js or the ACT if an equivalent solution exists in both. However, if you're tied to MicrosoftAjax.js with UpdatePanels or other existing code, don't be afraid to mix jQuery with that and transition to jQuery slowly. They work great together.
jQuery is the more popular, mainly because it is platform independent, but it's a good system in it's own right.
I don't think that there is anything wrong with ASP.NET AJAX for those developing on Microsoft platforms either.
I've used both, but I'm erring towards jQuery now, mainly because of the resources and samples available out there.
Does that mean the MS offering is doomed? Not yet. It will exist for as long as a certain number of people are using it, but I think it will always play second-fiddle to jQuery.
If you are an ASP.NET-only developer, have a peek at both and use whichever suits you best. If you develop on different platforms, then settling on jQuery might be more advisable.
PS. there are other cross-platform AJAX frameworks out there also...
In my opinion, jQuery is leaps and bounds better than the Ajax Control Toolkit. The main reason for me is the great back-up the community has given it. Not only is the jQuery documentation on the web better, but by jQuery not being a .NET-centric framework, the community is bigger, meaning that anyone from a Ruby on Rails developer to a PHP developer can help you with your code just as good as a .NET developer, which would be obviously harder to find.
Other than that, I've had better performance than the Toolkit, and I find it a whole lot easier to write against and customize. And you got to love jQuery UI.
By the way, be aware that by simply enabling the ScriptManager on your ASPX page, your loading a bunch of scripts which add extra load to your page. Something to have in mind before mixing up jQuery and the Toolkit.
I think that ASP.NET Ajax Toolkit is using jQuery under the hood. (this is wrong).
You may use both. I guess it depends on what you prefer, because Ajax Toolkit provides controls that you can use server side, while jQuery will always be client side only.
So you'll probably use both : when a control exist in Ajax Toolkit and you need some server side properties / accessors, etc. use it, if you need some functionnalities that aren't provided by the Toolkit, use pure jQuery.
Microsoft is working with the jQuery community and submits some patches to them. So I guess they'll continue to maintain the Toolkit. Ajax Toolkit being only a layer over pure jQuery functions and providing server-side controls.
Update:
Interesting quotes from this blog:
However, with Visual Studio 2008
Service Pack 1, we also added support
for the ever increasing popular jQuery
library. That is, you can use jQuery
along with ASP.NET and would also get
intellisense for jQuery in Visual
Studio 2008.
And :
For client side programming using
JavaScript for implementing AJAX in
ASP.NET, the recommendation is to use
jQuery which will be shipped along
with Visual Studio and provides
intellisense as well.
For server side programming one you
can use the server controls like
UpdatePanel etc., and also the AJAX
Control Toolkit which has close to 40
controls now.
ASP.NET Ajax and the ASP.NET Ajax toolkit are two separate things. The toolkit is a set of ASP.NET controls (and some other stuff). It's server side code and some javascript.
ASP.NET Ajax is an application framework you can use to create and manage client side controls; it's Javascript. The ASP.NET Ajax toolkit is based on this framework.
jQuery and ASP.NET Ajax have some overlaps in functionality but they are by no means mutually exclusive. jQuery is mostly geared towards updating and manipulating markup. ASP.NET Ajax is geared towards providing an application framework.
Microsoft has recently decided not to compete with jQuery but invest in it because jQuery and ASP.NET Ajax work well together and complement each other. JQuery is actually shipped with Visual Studio.
So, to answer your first question, you should use the JavaScript lib best suited for the job, be that jQuery or ASP.NET Ajax.
Whether you want to use the Toolkit, that depends on how much you like wrestling with ASP.NET controls. If you're into lean-and-mean coding like ASP>NET MVC, I'd drop it like a hot potato. If your in a traditional WebForms project, the toolkit is probably as good as it's going to get.

jQuery vs ASP.NET Ajax

What are the differences between jQuery and ASP.NET Ajax?
They are very separate things, jQuery is a JavaScript framework that has the ability to do some rudimentary Ajax functionality while ASP.NET Ajax is a more fully-featured Ajax framework that encompasses .NET controls and server-side aspects as well as client-side aspects.
jQuery's main focus is on a creating standard, stable, and powerful framework for working with JavaScript as a whole in the client.
Albeit ASP.NET AJAX encompasses a client side framework it is perhaps best known/feared/loathed for its server side controls, particularly the UpdatePanel. What you get with ASP.NET AJAX is out-of-the-box AJAX for the most basic stuff without having to write a single line of JavaScript.
If on the other hand you need to write some JavaScript or go a little out-of-the-box, working with ASP.NET AJAX can soon become a little tedious.
jQuery on the otherhand is lightweight and requires you to write JavaScript, although for most part, the jQuery guys has done a very good job of hiding the ugly JavaScript stuff away, so apart from a small learning curve it comes pretty natural (particularly if you are on home-stretch in CSS selectors).
Main problem in using jQuery with ASP.NET can be if you mess too much with the DOM you might get ViewState/Event validation problems.
jQuery is a standalone javascript library that can be integrated into any development environment. It it widely used and many great plugins exist for it.
It can be used for much much more than just AJAX functionality. Like traversing through current elements and changing their functionality.
ASP.NET AJAX is something else entirely, since it only focuses on AJAX like functionality in the .NET environment.
Main goal of ASP.NET Ajax is calling ASP.NET web services from client using simple JavaScript notation. It also provides client access to some ASP.NET server features. Like profile, for example. All other operations it's better to perform with jQuery.
i used Ajax Control Toolkit from microsoft quite extensively for 2 years before i switched to jQuery and in my experience i think jquery ajax calls are much more light weight, efficient compared to the ajax control toolkit libraries. besides that the efficiency ofcourse depends on the data that you send & receive via your ajax calls.
you can add custom HTTP Status codes in jQuery ajax calls as well to capture any errors on the server and returning the appropriate response.
#Andrew and #Ólafur hit the nail on the head, but I would add that the biggest concept that separates these two approaches to ajax development is that w/ jQuery you get total control of what happens between the client and the server. With the MS AJAX Toolkit you give up any control over what is sent between these 2 points. If you want to be "close to the metal" you would be best to choose jQuery. If you are just working up some quick and dirty solution that needs zero customization and speedy delivery is all your client cares about, maybe take a look at the MS AJAX Toolkit.
by the way - scott gu officially announced that asp.net would include support for jquery (full intellisense too) with their ajax framework (which is really bloated)
check this link - http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx
if you have used ms ajax, you would be aware its really really bloated up, and many things which ms ajax does - you can achieve via jquery writing few lines of javascript code, and you would save a lot on bandwidth and performance
you can even call asp.net json + xml web services via jquery writing just few lines of code

Resources