Storage and Javascript

From Software As She’s Developed, I came across Wanted: Massive Local Storage this morning:

Local storage - beyond 2KB cookies - is now a step closer with the latest Firefox effort…. The fantastic thing is Brad Neuberg’s Dojo work means we can code independently of the local storage mechanism. Since IE also has local storage, as well as Flash, most bases are covered, or soon will be: Anyone with EITHER IE or Firefox or Flash will have local storage. (Incidentally, we had a discussion in the comments on Ajaxian about the possibility of S3 and other remote bindings as well, which I’m guessing Brad will implement at some point.)

Quite interesting — I’ll have to look more into this…

As for Dojo, I browsed through the website and I get the feeling that I’d prefer Prototype+script.aculo.us. (But then again I haven’t actually coded in any of them yet, so this is based more on an extremely superficial glance.)

Having said that, I googled “dojo prototype scriptaculous” and found Jon Aquino’s comparison:

Prototype is more of a Porsche, whereas Dojo is more like a Hummer. Prototype is pure programming bliss (feels very much like Ruby), whereas Dojo is very much engineered (feels like Java) — possibly a little overengineered in some places (IFrame-based workarounds) in order to offer what no other toolkit offers (asynchronous file uploads; AJAX back-button handling; javascript “include” mechanism).

From Jon Tirsen’s comment on “Dojo or Prototype or …?”:

Prototype+script.aculo.us is really the way to go for Rails apps. Prototype makes JavaScript look more like Ruby (without loosing the essence of JavaScript itself) and script.aculo.us goes hand in hand with the convention over configuration/sensible defaults philosophy of Rails.

Dojo is interesting but quite frankly I think it’s slightly over-designed. There’s a significant learning-curve associated with it where as you can use script.aculo.us completely out of the box and get results really fast.

And finally, from Raible Designs:

I really like the idea behind both projects, but I can’t help but think Script.aculo.us is a little better. Why? Because its creator is a designer (vs. a developer) and its development is driven by one of the most popular web frameworks and it was built from a real-world application rather than a consolidation of libraries.

I think I’ll stick with Prototype+script.aculo.us. :) (I’m not a big fan of overengineered projects, nor do I like Java very much. Ruby is the way to go, and if it feels like Ruby, that’s what I want.) Even just comparing the script.aculo.us website to the Dojo website, script.aculo.us comes across better.

Now to start coding so I can base my choice on more than just surface skimmings…

    Comments on “Storage and Javascript”:

  1. Permalink to this comment Jonathan Aquino

    Hi Ben - I loved Prototype, but am currently working with Dojo and would miss a lot of things from it (for largish Javascript projects). Three things:

    (1) the “require” statement for including neighbouring Javascript files, facilitating the organization of a Javascript project into one-class-per-file

    (2) the Widget superclass, for modularizing GUI elements into reusable panels/widgets (widget = html + javascript)

    (3) the dojo.io.connect() function that lets me hook into any function call — before it, after it, around it.

    That said, it’s probably overkill for more traditional websites. So I think I’ll probably go Prototype for traditional sites, Dojo for richer, more javascript-heavy sites.

  2. Trackbacks/Pingbacks:

Leave a Reply