Introducing MochiKit - MochiKit Modules
(Page 2 of 4 )
MochiKit is comprised of 15 discrete modules that cater for a wide range of effects and functionality. Let's take a look at each of the modules in more detail.
First up is MochiKit.Async, the module that manages all of your AJAX and remote data collection tasks and is based on Twisted, an event driven networking framework written in Python. It handles asynchronous XML HTTP requests, XHR and JSON.
Next is the MochKit.Base module, which forms the foundation of the MochiKit suite and is a dependent of most of the other modules. Much of the code it contains is stuff that the author feels should be standard in native JavaScript but isn't and a lot of the concepts found here have been inspired by more powerful programming languages like Python and Java, or other JavaScript libraries such as Scriptaculous.
Following this is MochiKit.DOM which provides an easy to use DOM manipulation API based largely on part of a powerful Python web development toolkit. Its primary purpose is to allow for the easy creation and insertion of DOM node trees with minimal coding. It provides plenty of convenience methods for converting elements, removing and replacing elements and setting class names and attributes among other things.
MochiKit.DragAndDrop adds the ability to quickly and easily create richer interactive interfaces by creating elements that can be dragged and dropped on your pages. It was adapted from the drag and drop implementation found in Scriptaculous and is made up of just two constructor functions: one to create an object that is draggable and apply a set of default behaviors that occur while dragging, and one to deal with the dropping of dragged elements and with a set of different options to control the behavior of the element being dropped.
Next: MochiKit.Color and More >>
More JavaScript Articles
More By Dan Wellman