Why is it hard to compare AJAX libraries?

Tags: .NET, AJAX, Ajax.NET, ASP.NET

Months ago I started several chats with a lot of AJAX developers, some are using my Ajax.NET Professional library, others are working directly with the XMLHTTPRequest object. I had a look around and found that there are a lot of other libraries that are not working like my lib. The big difference is that they are using ASP.NET in the traditional way, drag&drop web controls on the page, add some event handlers and write two or three lines of code. With Ajax.NET Professional I completly remove the web controls from my mind. Some parts of my web sites are using web controls for initial display, but most of them are using about 95% JavaScript code.

Why is Ajax.NET Professional working like this?

The main reason was that I want to have the minimized traffic size to communicate with the server. If I'm thinking of an chat application I will always only transfer the new messages from the client-side to the server, and I'd like to get notified if there is a new message on the server waiting. With Ajax.NET Professional you can do exact this, only transfer the data you want, nothing more.

Today I had a look at the ComfortASP library developed from a good friend here in Nuremberg. The web application looks nice:

Now, playing around I started my favorite tool Fiddler. And what did I see?

Think of a slow connection, yes, today we all have broadband connections like DSL or ADSL+, but do we have this all the time? I started using my T-Mobile MDA Compact II to run AJAX enabled applications, but they are still slow, why?

If you have a detailed look in the chat example log history in Fiddler you will see that on every post (polling for new messages) we have around 718 (request) + 1772 (response) = 2.5 kB. This is sent over the line on each call for this small web application...

[Sorry, I have to check my GPRS contract if the data fits in my free contingent for this month.]   ;)

5 Comments

  • Oliver said

    I don't know why there are so many libraries that do the same wrong AJAX stuff, we don't want to use the viewstate, it is always too much to post and retreive it from the server.

  • Igor Kononuchenko said

    Hi Michael you wrote:
    "Some parts of my web sites are using web controls for initial display, but most of them are using about 95% JavaScript code."
    I like to write JavaScript code too... but there is you get some problem you spent yours time and reduce the speed of development. Even with great Ajax.NET Professional library you still have to write lots of JavaScript code. In my opinion JavaScript(and Ajax functionality) code should be encapsulated in Controls so you don't feel the difference between Ajax control and obvious WebControl...
    And
    What do you think about Atlas? and Have you seen Scott's List app(with using of UpdatePanel)?

  • Michael Schwarz said

    Hi Igor,

    I'm developing with the Atlas bits since the PDC 05. Before getting the bits I already talked to Brian and Jonathan about the Altas Framework. I see the need of some controls that come out-of-the box.

    But have a look at the web controls in ASP.NET 2.0. Our company cannot use a lot of control because we are designing web applications that have special needs.

    Scott's list is really cool as all Atlas demos are nice to see. Currently I see to many demos, but no real running web site, that will be great to use in every environment (and maybe on any device with any connection speed).

    For me all the AJAX stuff is nothing new, I'm using XMLHTTP or XMLDOM over HTTP over years. From my library I got lots of questions, and I can put these into two containers: one for the beginner and demo builder, and the second for the real web developer.

    Michael

  • Igor Kononuchenko said

    Michael, thanks for answer. I absolutely agree with you and I wanna just say that I recently asked in Scott's blog about Atlas compatibility with Opera, the answer:
    "Atlas doesn't have good support for Opera yet (we do support IE, FireFox and Safari though). Opera in general doesn't have the best Ajax support (its script support isn't super rich). We are working with the Opera manufacturers, though, to identify ways we can better integrate."

    And this new feature with Control adapters maybe it in combination with cross browser Atlas(in nearest future) can achive such effect like you said above(about devices)?

    ps in my opinion good thing for ajax in asp.net 2.0 is ClientCallbacks(especially for controls development)

  • Dave Bacher said

    The issue isn't the drag and drop controls, but rather the .NET framework itself, in 1.1.

    In ASP.NET 1.1, it is impossible to serve a resource from a DLL without a custom HttpHandler. Right there is why most of it is embedded -- because you can't just drag and drop a control on a form and point it where you need it to go and have it work, you have to go and modify the web.config.

    This isn't a sign of the quality or lack of it in a library -- its a sign of the intended use.

    Anthem is intended to take intranet applications and AJAX enable them -- this is pretty clear from its design. Its intended to be a fast and dirty solution to direct business requirements, versus being a foundation to build off of.

    My own intranet controls are very similar to Anthem in how they behave. I wrote down a list of business rules (which included being able to copy a single file to a server to enable it to run the control, and not requiring any other set up), and then I implemented according to those rules.

    In these intranet applications, bandwidth is almost never a concern, and browser audience is also usually extremely limited, and so you usually can get away with a lot more.

    I see Ajax.NET being more suited to exposing business logic to a web page. While yes, it can be used to populate a select box and can be attached to an onclick event, etc. it seems to me that that is not even scratching the surface of what it can do.

Comments have been disabled for this content.