Archive

mugtug.com darkroom code review

I am looking at http://mugtug.com/darkroom in firebug and it's one big canvas element. Pretty impressive! Kind of what bespin did with the creating a code editor, these guys did with creating web based Photoshop.

Give the complexity I suspect there is a nice "HTML5 canvas javascript library" and I am right. Everything is custom code from these guys, and it is actually nicely written, at least at first glance. Looking at the global object, it is pretty pouted so I suspect, there are some layers of good code and bad code, somebody did not have time minify the JS files yet, which is a actually good for us, because we can see what's going on better.

As for utilizing third party code, I see references to Jquery, Douglas Crockford's JSON stringifier, and Canvas2D.js, Javascript Library, that helps you to work with canvas.

To my disappointment, the performance seems to be not quite there yet. This has nothing to do with the code, but the browser is perhaps not ready yet to do this type of image processing. When I uploaded a little large image, and tried to do some color adjustments, I had to wait seconds till something happened, freezing the screen rather than getting a wait sign.

Anyway, this app proves that the future for HTML5 looks pretty exciting. In the code I even see some signs that "tough events" are supported, opening a whole new market for rich internet tablet apps.

Comments: