Archive for the 'Ajax' Category


Ajax transports still need to evolve

Tuesday, June 6th, 2006

Michael Mahemoff talks about Ajax transport layers and their problems.

In my Ajax Experience presentation last month, I covered all the available transport layers, their history, pros and cons, and provided some example code. My main intention in doing so was to demonstrate that there has been over 8 years of evolution of Ajax-related techniques to bring us to where we are, and to underline that Ajax is not a done deal, there is still work to be done.

The ReadyState 3 issue that Michael talks about has been well known (well, apparently not well known) at least since Scott Andrew LePera described the problem in late 2002. It really needs to be fixed.

Cross-domain issues also still need to be addressed. I spoke to Brendan Eich from Mozilla about this at the conference and he mentioned that there are other W3C specs that use access control lists, which may provide an existing base upon which to build an XMLHttpRequest ACL model. Laurel Reitman on the IE7 Team was also involved in discussions about this issue.

Douglas Crockford‘s JSONRequest proposal goes a long way towards suggesting solutions to the various limitations of the current state of available Ajax transport layers.

Jesse James Garrett communicated very clearly in his keynote that Ajax is no longer an acronym to be limited to its original initials. According to Jesse, as long as these two basic ingredients are involved, what you have is an Ajax application.

  • asynchronous interaction model
  • browser-native technologies

Hopefully, organizations like the new OpenAjax Alliance will be able to reach consensus on what needs to be done and how in order to take us to the next level in Rich Internet Application evolution.


Prototype group on Google

Tuesday, June 6th, 2006

(via James McFarlane) For those of you (and I know there are many) who find it difficult to understand Sam Stephenson‘s Prototype library without a definitive roadmap or documentation, there is a new Google Groups Prototypejs group where you can at least commiserate with others in the the same boat, and at best share tips and collaborate.


Ajax on IE7: make sure you invoke native XMLHttpRequest object

Monday, June 5th, 2006

Through working with the IE7 team, we’ve figured out the problem behind the IE7 XMLHttp resend issue I reported a while ago.

The short answer is this – we’ve demonstrated that in our app at least, IE7 resends its XMLHttpRequest data if you use the ActiveX XHR object, but works correctly if you use the native IE7 XHR object. Be sure that your XHR-creation code uses “new XMLHttpRequest()” to invoke the object in IE7 and you will not have the problem.

Tim Aiello explains in more detail.


Free Tools for Debugging Javascript (and Ajax apps) with Internet Explorer

Friday, May 26th, 2006

I have seen a lot of griping over the years about an imagined scarcity of debugging tools for IE. I find it remarkable that people in the business don’t know what’s available.

Microsoft has had great debugging tools for IE since Visual Interdev as far back as 1998 or so and continuing through to Visual Studio. The visual studio debugger has breakpoints, watch variables, call stack, step in/out/over, object browsing, immediate window, debug output window, and more.

If you didn’t want or need an entire IDE, Microsoft Script Debugger became available as a download for NT4 and Win98/ME, later becoming a component delivered with Windows operating systems as of Windows 2000 that simply required enabling. The Script Debugger is a lot lighter than the VS debugger, but still has breakpoints, watch variables, call stack, step in/out/over, immediate window, and debug output window.

Now Microsoft has released their Visual Web Developer Express IDE for free. Install it, then in your browser’s advanced options, uncheck the two boxes that disable debugging, and you have a debugger that is every bit as powerful as Mozilla’s Venkman ever was.

Here is a screenshot of a simple single-page debug session (click to open full size):

Visual Web Developer Debug Session

No wonder it took so long for Javascript to get any respect if people didn’t know that there were decent tools for it.


Ajax Experience – a play within a play

Monday, May 15th, 2006

There were two levels of conference going on at The Ajax Experience last week.

The first level was the conference where the presenters put on a terrific show for the attendees, with lots and lots of presentations about tools and techniques and a number of expert discussion panels.

The second level was the conference among the presenters, tool providers and industry experts, making the connections that will sow the seeds that make the coming years as exciting and fruitful as those recently gone by.

I was very happy to meet Douglas Crockford again. His work on JSONRequest and Javascript advocacy have been instrumental in sparking the conversations that will lead us towards changes in the browsers that will take us to the next level of not only interactive but even robust web applications. I applaud Douglas for taking a stand and proposing change. It comes as no surprise that Douglas is at Yahoo with Bill Scott, another guy at the absolute top of his game as an interaction designer. I’m noticing lately that Yahoo is quietly attracting the creme de la creme to work with them on advancing the state of the art in various ways while the other big guys are busy chasing the ball around.

In the browser camps, Brendan Eich shared his directions for Javascript and Mozilla, and Laurel Reitman helped us to understand that the IE7 team is keen to help us all move forward and solve the challenges that are decelerating our efforts – cross-domain security for instance. While there was some contention, the overall impression was of cautious steps towards increased levels of openness and collaboration.

Michael Mahemoff impressed me as someone who is truly passionate about patterns. His work in gathering patterns from far and wide has no doubt helped us all tremendously.

Big thanks to Dion Almaer and Ben Galbraith, who had the foresight to gather together a remarkable mix of thought leaders and catalysts to make a lasting difference, and who along with Jay Zimmerman did a stellar job of hosting what to many in attendance will be remembered as the tech event of the year.


Ajax Experience

Thursday, May 11th, 2006

I’m in San Francisco at The Ajax Experience. Alex Russell is explaining the Dojo Toolkit, one of the primo Ajax toolkits. I’m seated beside Douglas Crockford and directly behind Michael Mahemoff of Ajax Patterns.

Last night I sat on an expert panel, after which a few people gathered by the podium to speak. Laurel Reitman, Lead Program Manager for IE7 came over to get involved in the conversation, and I took the opportunity to introduce her to Brendan Eich, CTO of Mozilla. It certainly looks like this conference could be a catalyst in some really great forward movement.


IE7 XMLHttp resending requests?

Friday, May 5th, 2006

Tucows used BlogChat earlier this week for the Ask Tucows chat they regularly host for their partners, clients and other interested parties.

After the chat was closed, I noticed that Bryan’s browser continued to resend chat messages. These were repeats of earlier conversation from his browser, and being sent in their original order, although not with exactly the same timed spacing. They were actually coming in as logged http requests from his IP. I quickly got Bryan’s number from whois and called him at his desk. He still had the browser running, but had closed the chat tab immediately after the chat. His browser continued to send these old messages after the tab was closed!

I’ve looked at our code. We recently changed the transport method on the visitor chat client from img/cookie to XMLHttp (with failover to hidden Iframe) to a) avoid cross-domain problems in embedded chat windows and b) be more AJAXY. The code creates a new XMLHttp object each time but then does not explicitly dispose of it once its onLoad has fired. The polling nature of the app means that many of these objects are being created. I’ve yet to
determine whether certain browsers keep them around where others don’t.

My working theory is that IE7’s native browser implementation of XMLHttp (as opposed to IE6’s ActiveX implementation) not only keeps these objects around, but for some reason starts re-firing them later on, for some reason in the order that they were created.

While I’ll definitely look into disposing of the objects once used, I think this behaviour could constitute a pretty nasty bug if your ajax calls do things like “delete record” or “apply charge to account”.

I’m away at The Ajax Experience next week but after that I’ll set up a vm test environment. In the meantime, has anyone had similar experiences with IE7 and XMLHttp?


Mixing with the masses at MUSH

Wednesday, April 19th, 2006

Via TheMose and, it looks like although due to a calendar mismatch I’ll be missing Mesh it doesn’t mean I can’t be first in the mosh pit at MUSH!

Come along and together we’ll energize synergies and enable a Web 2.0 user-generated content value proposition.