Alex Russell has coined a term for a flavour of Ajax that’s been getting more attention of late. Comet describes applications where the server keeps pushing – or streaming – data to the client, instead of having the browser keep polling the server for fresh content. Alex identifies several buzzworthy examples:

This is an important article because it captures a growing trend in Ajax, a trend I had in mind when I said we expect to hear more about “Push and the Two-Way Web” in the next twelve months, on the occasion of Ajax’s birthday. There will, of course, be people saying “there’s nothing new here”, and that’s presumably all too obvious to Alex himself, who has worked with these ideas for a long time. But as with Ajax, it’s the power of a name. I don’t think these ideas can adequately be described as Ajax, because Ajax changes a lot about the browser whereas Comet fundamentally changes the nature of browser-server communication. I see Comet as part of the overall Ajax trend, complementary to the UI aspects of Ajax.

People may also say there are existing names like “Push”. True, but they have baggage – I think it’s useful to have a name for this architectural pattern in light of the relationship to Ajax.

Anyways, I wanted to expand on some of the thoughts in the article and after the recent Basics of Ajax Podcast, I’m in the mood for more audio rambling. So here’s a 56-minute discussion about Comet and the general trend of push and streaming within Ajax.

Shownotes…

It's the Duplex, Stupid!
Push or Pull - it doesn't matter so much. What's critical here
is the focus on the two-way web.

Benefits of Polling
- Browser memory
- Can run on any standard server; Comet requires suitable
server
- Can upload at the same time
- Can run on - with Comet, XHR and IFrame won't always reflect
changes while the connection's open
- Being more standard, works with existing infrastructure.
Comet is vulnerable to middle-men dropping the connection.
- Simpler architecture - only the browser's in control
- Easier to test
- More familiar architecture
- Less programming effort - with Comet, must watch for changes
on the stream
- More efficient for infrequently accessed data
- Leverages caching

This 77 minute podcast covers all the foundational technologies not yet covered in previous podcasts. Due to some reshuffling as the book was being edited, there are now four more patterns here than previously announced:

User Action Using the DOM’s event mechanism to deal with user actions such as mouse clicks (02:05)

Scheduling Schedule one-off or continuous events – Javascript code to run in the future (15:55)

Ajax_App The root of all Ajax (Note: The wiki version is empty at this time). Discussion of [Ajax Deluxe versus Ajax Lite]((http://www.softwareas.com/ajax-lite-versus-ajax-deluxe). (22:10)

Web Service The thing what sits on your server and gets called by the browser ‘n’ stuff (Note: The wiki version is empty at this time) (31:30)

This 77 minute podcast covers all the foundational technologies not yet covered in previous podcasts. Due to some reshuffling as the book was being edited, there are now four more patterns here than previously announced:

User Action Using the DOM’s event mechanism to deal with user actions such as mouse clicks (02:05)

Scheduling Schedule one-off or continuous events – Javascript code to run in the future (15:55)

Ajax_App The root of all Ajax (Note: The wiki version is empty at this time). Discussion of [Ajax Deluxe versus Ajax Lite]((http://www.softwareas.com/ajax-lite-versus-ajax-deluxe). (22:10)

Web Service The thing what sits on your server and gets called by the browser ‘n’ stuff (Note: The wiki version is empty at this time) (31:30)

The design behind Blummy. (Interestingly, I was incorrect to guess it uses XHR – basically, the Blummy is like a Greasemonkey script – it uses DOM manipulation to alter the page you’re on, building up the container of all the Blummlets, and interacts with other sites using standard HTTP requests.)

These will be useful if your familiar with basic forms and CGI-type web development, and wanting an overview on Ajax development techniques.

If you do know enough Ajax to at least write the obligatory Ajax chat application, there’s probably not much new info here. The most interesting pattern will be HTTP Streaming, covered in the next podcast.

Note that the pattern names and structure are subject to change, but the basic ideas will remain valid.

Podcast 1: Display Patterns and the DOM

This 42 minute podcast covers the DOM and the following patterns:

Display Morphing: Morph display elements by altering styles and values in the DOM, such as text and colour properties.

Credits and Production Notes

The podcast concludes with the world’s first HCI Rap, “We Got It”, from the multi-talented team at OK-Cancel (the website with the funniest usability cartoons around).

The theme, My Morning Jacket’s “One Big Holiday”, is back too.

For the podcasters among you, the podcast was produced on a Powerbook running the excellent
Audio Hijack Pro, with Bias SoundSoap and Apple’s new AUAudioFilePlayer plugin to cue audio. For the podcasters among you, this is a nice, easy, setup: allows recording directly to MP3, real-time noise reduction, ability to cue up sound clips, tag the MP, run a script at the end (which could FTP the file somewhere). In theory, you could have a podcast up a few minutes after you’ve clicked the stop button. Rogue Amoeba, creators of Audio Hijack Pro, know how to make software that’s intuitive and seriously useful. There’s detailed instructions for podcasters in the manual and also a blog entry on podcasting with Audio Hijack Pro.

I’m pleased to announce the in-progress patterns at ajaxpatterns.org will be completed and published as an O’Reilly book: “Ajax Design Patterns”. The accompanying podcast explains the details, here’s a summary:

I’ll be completing full-text descriptions for all the listed patterns, give or take some restructuring.

ajaxpatterns.org will remain online, with full content – before, during and after the book’s release. I’ll continue building up the text on there. O’Reilly’s fully on board with this.

A Creative Commons license will apply throughout, with the non-commercial restriction possibly lifted after the book’s published. Contrary to John Dvorak’s recent rant, the CC license cannot, should not, and does not, preclude others from reusing the content commercially under fair use.

Somepages on the wiki are already open The main pattern pages will remain me-only until full-text is there, at which time I am hoping to take a branch, refine some things offline (mediawiki is painful for batch changes), and open everything up for editing.

The editor is Brett Mclaughlin and he too will be able to make edits. You might have seen that I’m highlighting patterns with full text on the main page. Brett will highlight them in a different colour once edited, hopefully leading to something resembling a “progress heatmap” and not a pile of visual mess.

I intend to podcast about the patterns and the corresponding examples at Ajaxify. I’m looking forward to being able to supplement the text with audio commentaries. Some prefer audio, some prefer text, but I think the best learning style is a multimodal combo deal.

Writing this in public will allow ample opportunity for feedback – as Dan Gillmor says, my readers are smarter than me. I know lots of you are using Ajax in different ways and for different tasks, so please tell me what sucks about the patterns. Comment in the Discussion tab for a given pattern (which I’ll pick up via RSS), leave a comment on my blog, or mail to [email protected].

Do you have any comments or suggestions about this writing strategy? Please leave them here or mail [email protected].

This entry has a Podcast attached- an embedded MP3 link. On
Internet Explorer, Click on the Podcast icon to listen, or click the right
mouse button and “Save As…” to download. Better yet, you can subscribe for
updates straight into your PC or ipod – it’s easy, open, and free. Install
the free, open-source, Ipodder client and
when it starts, just paste this in: “http://www.softwareas.com/podcast/rss2”.
Or search for “software” under the ITunes Podcast Directory. More info in the Podcast FAQ.

Share this:

G’Day

Welcome to Michael Mahemoff's blog, soapboxing on software and the web since 2004. I'm presently using HTML5 and the web to make podcasts easier to share, play, and discover at Player FM. I've previously worked at Google and Osmosoft, and built the Ajax Patterns wiki and corresponding book, "Ajax Design Patterns" (O'Reilly 2006).
For avoidance of doubt, I'm not a female, nor ever have been to my knowledge. The title of this blog alludes to English As She Is Spoke, a book so profoundly flawed it reminded me of the maturity of the software industry when this blog began in 2004. I believe the industry has become more sophisticated since then, particularly the importance of UX.
Follow @mahemoff