DISCLAIMER: This is a pipe-dream, random, 3 AM thought. Do not take seriously.
This is a two part letter to the Open Source JS authors of the world and to Alex Russell of Dojo (now Google) fame. But first, a little background.
- Event delegated controllers
- A model layer based off JesterJS.
- Integrated client-side templates with EmbeddedJS.
- A dependency management and build system with include.
- Browser History with Really Simple History
For the most part, I just took what other people’s projects and packaged them up. Event delegation via controller was the exception.
But in these 3 years, solid alternatives have developed. For example:
- jQuery widgeting – $.widget
- Model – js-model
- Dependency Management – RequireJS, LabJS
- Client Side Templates – JAML, Mustache, jquery-tmpl, etc
- History – Sammy, jQueryBBQ
With that, I begin my letters …
Dear Open Source Authors,
Can we start putting aside differences and collaborating? Yes, we might disagree on a few design goals, but there are clear wins. For example:
- $.widget is lightweight (and now broken into parts)
- $.Controller can bind / unbind all event handlers automatically
- LabJS is fast
- RequireJS keeps namespaces ultra clean
- StealJS can handle Less, CoffeeScript, and a ton of templates, and split builds across pages.
- Sammy is elegant
- BBQ is light weight (and lower level)
- FuncUnit is … well, there is no comparison here, but I’ve asked for it to become part of Selenium and qUnit
Surely, we can figure out ways of working together to ‘solve’ these problems that doesn’t involve building another tool from scratch? Today, low-level libraries like jQuery, Dojo, and MooTools are extremely close in what they provide. There’s no reason to write another offset method!
Imagine a world where you can build your own toolkit from parts of other libraries with little or no waste. Want to use jQuery’s event system with NWMatcher? Just require(‘jquery.event’,’nwmatcher’). Use the perfect build tool to make your own perfect library.
Unfortunately, I don’t how to make this happen or even where to start. I certainly don’t have enough influence. I’d be interested in sponsoring a collaboration meetup of sorts with some framework / library developers. I really want to combine StealJS, RequireJS, and LabJS.
But, before I get ahead of myself, there is someone who already accomplished this who might have some solid advice …
Dear Alex Russell,
First, I have a huge man crush on you. How can you blame me? Your beard screams old-spice-guy manliness.
It’s my understanding that you started the collaboration of competing toolkits that led to the creation of Dojo. How did you do it!?!? All I found is this short article. It doesn’t provide any suggestions on how someone without your charisma or skill could accomplish this feat. Getting together a pool of talented developers to unite under a single project must have taken a considerable effort.
Unfortunately, the Dojo project missed an opportunity by not releasing something that became jQuery. But …. I wonder … is it possible to correct that so everyone can start moving forward together?
My pipe dreams are clogged. Sincerely,