Thomas Hervé recently posted the answer to one of my lesser prayers to the MochiKit mailing list last week: A port of the scriptaculous effects and drag & drop libraries to use Mochikit.
Basically this frees you from the extra overhead of both the scriptaculous and prototype .js files. I was using scriptaculous for the sole purpose of creating effects. Mochikit has always done all the real work as I understand it a lot better than any other library. The best thing about this port is that, aside from the different script tags, the code for creating and using the effects doesn’t have to be changed at all! It’s literally a drop-in replacement.
This adds to mochikit the one thing that was missing and has made me a lot happier in using it as I don’t have to worry about the bandwidth being wasted on some hefty js files just to make things slide and fade out.
Kudos to Thomas, and many thanks.
Karl G | 19-Jan-06 at 6:00 pm | Permalink
The port is actually larger than the original scriptaculous library including the overhead of prototype.js. It will eventually be smaller but at the moment New.js implements most of the prototype functionality by copying the appropriate functions out of prototype.js. I’ve done some work on whittling down New.js but not as much as I’d like. If you’re interested in checking out the progress, you can grab a darcs checkout at [1]. This is still a drop in replacement but stuff outside of effects might or might not work.
[1] http://gr.ayre.st/~grayrest/mochi/mochiriffic
If you’re looking for space efficient effects, a mochi port of moofx would probably fit the bill, but it wouldn’t be a drop in replacement for Scriptaculous.
Splee | 24-Jan-06 at 3:43 pm | Permalink
I agree, the mochikit effects are currently larger. What I really mean is that there’s no extra overhead for things that aren’t being used.
While that doesn’t actually amount to the same thing I have no doubt that as development proceeds the MockiKit effects packages will get a lot smaller.