New name, new game!

I’ve been reading a lot about the shortcomings and pitfalls to watch out for with AJAX. Some of the issues are real, others are doubts created in the mind when we shift from one paradigm to the other. We’re so used to the old one that fitting old concepts in the new frame seems disorienting.

The point being, this is supposed to be another way of doing things. Do NOT mix up what you have amassed so far. In order to create a real web application, that is more or less based along the lines of a console application, we need to import lessons from the “console camp”. eg. the concern about breaking the back button seems pretty much a “new tech with old concept” problem. This is an entirely different application architecture. So in order to render the UI, rather than a normal browser window, use a controlled environment, such as a window without a few toolbars. The users have to know that they are no more dealing with web pages anymore but the application in its entirety.

Then comes the request queue concern, assuming that the network is not reliable, think of the requests in terms of messages between application tiers. Each message is assigned a unique ID and a timeout is set on the client side. This is something Harry had written about some time back. Send no more that one message out at a time. The system must work in a linear fashion as far as the request queue processing is concerned. So in this case the next message isn’t sent out until the first one has been acknowledged and its corresponding data recieved.

Then comes the implementation problem. I have come across some websites that have poorly implemented AJAX. Yahoo!’s avatar system is one such example. There seems to be a good use of the xml request object and DOM and CSS but what about the notifications? The user even in this case, has to wait, even if it be for a short while (Dial-up users like me know). But if the user sees no refreshing, no status messages, no notifications etc they tend ot get worried. So whenever you implement it, make sure real-time notification is a part of your application architecture.

Finally, addressing the session issue. I believe that this method is best suited for non secure data transfer since cookies are the only session management option. Contradicting Harry’s post about sensitive information transmission security, there is some data you just never store in cookies, why must exceptions be made for AJAX.

The idea is to use the framework the way it is supposed to be used. We don’t use MFC for embedded systems’ programming do we?

One Response to New name, new game!
  1. Vindication! - Ajax Blog
    July 12, 2005 | 3:25 am

    […] #8217;s just warning the user to be nervous. The simplest solution I can think of is that Harshit recommends – only ever have one async request in progress at a time. In Javasc […]