Tuesday, February 5th, 2008
Roberto Saccon has taken the Dojo example program sketch, which itself “fully implements the idea of pipelining the drawing process based on sequential commands for adding, modifying or deleting objects” and has Cometized it:
Very little additional code was necessary to combine the chat app and the drawing app into a collaborative example app. I added a single line of code to the drawing app to let it publish its demands using Comet. Another line was added to the chat app for sending incoming drawing commands to the drawing application (any additional code only served to make things prettier, more readable, or easier to extend).
The application has been tested on ErlyComet (and there is also the source code), but there are no server-side dependencies, so in theory it should run equally well on any Bayeux-compliant Comet server. And there is also a short screencast.
What is missing to make such an example application suitable for real life tasks? A lot, of course: the whole server-side logic, for one. And deciding (automatically or based on human interaction) which incoming changes should be applied to the master document (like conflict resolution in version control systems, just in quasi-real time).
Very nicely done.
Posted by Dion Almaer at 7:48 am