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 ...
Get Learning JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.