h1

Prototype group on Google

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.

h1

Ajax on IE7: make sure you invoke native XMLHttpRequest object

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.

h1

Ajaxio proof of concept for Ajax Visio functionality

June 1st, 2006

I’ve been acquainted with James MacFarlane for a very, very long time. I first met him in the early 80s when he wrote articles and columns for various Toronto-based computer trade magazines and was active in the tech community. A few years ago, long before the Ajax revolution, he was managing a dev team at Moveable Inc and had me in to give a presentation to his staff about Remote Scripting and related techniques.

Always ahead of the curve, James is at it again with a new proof of concept called Ajaxio, that does Visio-style stuff in the browser. This is an excerpt from his demo page:

The purpose of this experiment is to see if a Visio-type of tool could be developed in a web browser. Using Prototype, script.aculo.us and Water Zorn’s SVG library I managed to hack together a simple demo. It’s not perfect, but it demonstrates that it can be done. There is no Ajax writeback to the server in this demo, but it could be easily added as a call in prototype.

Neat stuff.

h1

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

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.

h1

Today Creative Commons Salon, Tomorrow Mush

May 16th, 2006

I went along to the first Toronto Creative Commons Salon tonight and met some amazing folks. While I’m only on the periphery of this stuff, I had some great conversations and was able to act as a connector between some people and others with similar interests.

On the way back to the car, I managed to run into a whole gaggle of folks in post-Mesh celebration. I tell ya, this town she is a-hoppin’ with tech vibes.

Tomorrow night it’s off to Mush, the Web 2.0 Piss-Up. Hope to see you all there.

NOTE: I’ve been under the misapprehension that the Monarch Tavern, where Mush is being held, was all the way up at Bloor Street, however it turns out it’s down below College West of Bathurst as shown here

h1

Ajax Experience – a play within a play

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.

h1

Ajax Experience

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.

h1

IE7 XMLHttp resending requests?

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?