MochiKit
As soon as you access the MochiKit web site, once you get past the ubiquitous lime color, you see the words proudly proclaimed across the top:
MochiKit makes JavaScript suck less
In my opinion, if JavaScript sucked that much, it wouldn’t be used so extensively, and we wouldn’t have the rich set of libraries and frameworks, of which I’ve only provided a sample in this chapter. However, be that as it may, MochiKit has a nicely organized web site that makes it very easy to find demos, documentation, and code. As with other libraries, MochiKit functionality is packaged into several different behavioral and UI components, including:
MochiKit.Async: The Ajax componentMochiKit.Base: Foundation for the MochiKit frameworkMochiKit.DOM: Wrapper around DOM functionalityMochiKit.DragAndDrop: The ever-present drag and dropMochiKit.Color: CSS3 color abstractionMochiKit.DateTime: Date and time functionalityMochiKit.Format: String formattingMochiKit.Iter: Adds iteration capabilityMochiKit.Logging: “We’re all tired ofalert( )”MochiKit.LoggingPane: Interactive logging paneMochiKit.Signal: Universal event handlingMochiKit.Style: CSS APIMochiKit.Sortable: Sortable effectsMochiKit.Visual: The usual visual effects, such as rounding, visibility, and opacity
There are several interesting modules, all worth exploring. But
the one that caught my eye was “We’re all tired of alert( )”.
I find that alert is handy to debug, but true, it isn’t the most efficient. I decided to take a closer look at MochiKit ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access