Dustin Diaz releases DED|Chain, a JQuery-a-like library based on the Yahoo UI library. Apart from winning this week’s “Most Ridiculous Name For A Software Project” award (previous winners include Ning), it looks pretty cool. Nice work, Dustin.
There is one concern, though. When I say it’s JQuery-a-like, I’m not kidding; it looks a lot, lot like JQuery. This isn’t necessarily a bad thing; I use JQuery all the time because I think it’s brilliant. However, it’s pretty clear to me when I’m looking at arbitrary JS code whether it’s JQuery code or not. Now, with D|C in the world, I’ll have to be pretty careful to know which bits are DED|Chain bits and which are JQuery. In fact, I’m inclined to not use D|C too much purely because I don’t want to pollute the bit of my brain which remembers JQuery things with parts of D|C.
Of course, it’s difficult to know precisely what D|C supports because the link to the docs (http://dedchain.dustindiaz.com/api/docs/, as mentioned in readme.txt) is 404, but I’m assuming that that’s just because we’re so early into release.
There are now sufficient libraries out there that one useful part of a new library’s documentation would be to show “translations” between one of the “headline” libraries (YUI, Prototype, JQuery, Dojo…what else should be in this list?) and your new library; it’ll help people who are already using libraries to understand why they might want to switch to yours, and it won’t hurt people who are approaching your library as their first. So, a few examples which say “to do this effect, you’d do this in YUI, and you’d do it this way in MyNewLib” would not go amiss for new JS library developers; what you’re trying to do with that is convince someone like, oh, say, me to move from their current library of choice to your new one. The advantage there is that people will go out and evangelise for you. Of course, getting someone who doesn’t use a library at all to be convinced by yours is equally a coup; you can’t dodge the need for proper documentation by just saying “read Prototype’s docs and then convert your code from Prototype to MyNewLib” :)
I was faintly surprised that D|C is an actual new library rather than just a “port” of the JQuery API to YUI (meaning that I could switch my JQuery apps to D|C without changing any code, and get the (debatable) benefit of the “reliability of Yahoo! UI”), but I guess that YUI’s asserted reliability isn’t enough on its own to motivate a port, and that’d stop Dustin doing anything innovative.
Library proliferation is, in theory at least, a bad thing, but I don’t think so. We’re so early in doing structured JS development in a web-wide, collaborative way (not just inside one company, say) that it’s worth exploring lots of different approaches to library development and JS development as a whole, and see in a year or so what’s emerged as the leading techniques.
Right, now I must go away and have a play with DED|Chain. Stupid name. I can’t get out of my head the image of a chained and dead pirate, swinging from the gibbet in eternal torment. An idea for a logo there perhaps, Dustin.
We’ve actually considered providing library-specific documentation for jQuery. We opted not to (for now) due to the fact that it would provide a negative outward appearance for the library (your library sucks! use this one instead!). Although, maybe it isn’t as bad as we think it would be.
I think the most important part of those tutorials would be the introduction of the library’s specific philosophies, and how they differ from another library. This is an aspect that trips most people up, coming from another library (e.g. Prototype emphasizes ID selectors, jQuery emphasizes full selectors.) One isn’t necessarily right, and the other wrong, but pointing out those differences is absolutely important.
We currently list the “transitioning” tutorials here:
http://docs.jquery.com/Main_Page/Desired
That list tends to complement the full list of desired tutorials listed here:
http://docs.jquery.com/Tutorials/Desired
Posted by http://ejohn.org/ on March 20th, 2007.
I think my post got deleted when I signed in via OpenID. To summarize:
“Transitioning” tutorials would definitely be useful. We currently list them here as being desired for the jQuery site:
http://docs.jquery.com/Main_Page/Desired
We’ve held off on them, for now, simply because we tend to feel that a tutorial of that nature would come off as being narcissistic, and possibly be in poor taste. Which is interesting, because they would absolutely be very useful to a large number of people. We’ve been trying to “play well with others” and we’re mixed as to if those tutorials fit in with this strategy.
Additionally, the “transitioning” tutorials can absolutely help users better understand the philosophy of a particular library. Generally, libraries tend to be built and focused very differently, so helping a user understand the differences, better, would be ideal.
Posted by http://ejohn.org/ on March 20th, 2007.
John: it didn’t get deleted, it just went into the moderation queue. Not sure why; I suspect because it has links in it. Stupid Wordpress. Sorry about that. :)
Posted by sil on March 20th, 2007.
I think it’d be fine to provide “transitioning” help. It’s not there so you can say “stop using LibX, start using JQuery”: it’s there so people who are already debating doing that can find out how. Your point about the philosophy of a library is very well taken; I’d like to see more of that. It takes some time working with a library to get a feel for the soul of the thing, which way it tends to lean, and a summary of that sort of thing from the devs before you start working with a library would be pretty hugely helpful.
Posted by sil on March 20th, 2007.
Stuart,
this is great feedback! You bring up all very valid points (even the name ;)). Yes, the API docs are not there. I released it just yesterday, but plan on them being there this week.
This is not a replacement library for jQuery (meaning that you can’t swap this out for jQuery, and your code magically begins working).
My best advice for playing with it now is to just read the unminified source… it’s fairly simple to read. Anyhow, I’d like to link to this post because it has such great criticism. It will definitely give readers something to think about. Good and bad.
Best,
Dustin
Posted by Dustin Diaz on March 20th, 2007.
FYI: there is some partial documentation now found here: http://dedchain.dustindiaz.com/api/docs/
Posted by Dustin Diaz on March 21st, 2007.