The Detailed Description Of MochiKit JS Library And Its Function
After loading, it is efficient in manipulating data sets of JSON encode as well as the MochiKit.DOM for creating dynamic web page components easily. The web application stack of TurboGears Python gains functionality from client side by MochiKit. nIppolito’s familiarity with Python community has also made him incorporate a number of idioms which the Python programmers would find to be familiar –hence, it is widely used in the web applications based on Python.
As the “feature complete” tool, there is no active development going on because the developers are confident that it consists of all the best features from the modern advanced frameworks and hence, no major change is required in near future.
Demos Of MochiKit
With focus on coding and documentation, the following demos of MochiKit will help out any beginner as well as experienced coder.
- With MochiKit.Signal, Key Events demonstrate key handling procedure
- Draggable also makes use of the MochiKit.Signal for creating easy drag handler based on CSS.
- The Logging Pane is also a no-frills section which demonstrates pop-up (debuggingBookmarklet) and inline modes (Inline LoggingPane) of the log levels of MochiKit.LoggingPane and MochiKit.Logging. The Logging actions are logDebug, log, logWarning, logError and logFatal
- MochiRegExp or Regular Expression explorer is created with the MochiKit.Async and MochiKit.DOM. It matches regular expression “live” by manipulating the display and facilitating live updating.
- View-source uses MochiKit.Async, MochiKit.DOM and dp.SyntaxHighlighter to help in syntax highlighting for the source codes and sources for other examples. From the location.hash, the file source path is read and after loading doSimpleXMLHttpRequest it is inserted into DOM along with replaceChildNodes
- AJAX Tables demonstrate comprehensive MochiKit application built on sortable tables. It can use MochiKit.Async for loading JSON and XML documents or MochiKit.DOM for displaying the fetched data.
- Color Wheel in fully CSS3 model shows off color support with MochiKit.Color. You will be able to notice significant Alpha Blending on browsers like safari which support CSS3 RGBA () colors. As for other modern browsers, Color Wheel emulates alpha blending with background colors. Some of the colors thus offered are Antique White, Midnight Blue, Dark Green, Forest Green, Sandy Brown, Misty Rose etc.
- The MochiKit.Visual effects with MochiKit.Visual offer combination effects like Visual.fade, Visual.puff, Visual.appear, Visual.slideUp, Visual.slideDown, Visual.blindUp, Visual.blindDown, Visual.dropOut, Visual.squish, Visual.shake, Visual.grow etc. Big slide, Onload, Scroll, Shrink, Grow, Queue are some of the other effects.
- If you want HTML elements to look fancy with rounded edges, the Rounded Corners with MochiKit.Visual will help you in creating examples without any difficulty and without making it look weird.
Documentation Index Of MochiKit
As mentioned before in respect with the demos, here is the distribution of documentation of MochiKit –
- Async –For managing asynchronous tasks
AlreadyCalledError, Deferred, DeferredLock, callLater, fail, loadScript etc
- Base –For functional programming along with comparisons
For e.g. NotFound, average, compare, concat, extend, camelize, bool, counter etc
- DOM –for seamless DOM Manipulation
For e.g. NBSP, emiyHTML, escapeHTML, createDOMFunc etc
- DragAndDrop –to help in dragging and dropping elements
For e.g. Draggable, Droppable
- Color –For creating color abstraction through CSS3 support
For e.g. Color.fromHSL, Color.namedColors, Color.fromText etc
- DateTime –for detecting date and time
For e.g. isoDate, isoTimestamp, toISODate, toAmericanDate etc
- Format –for string formatting
For e.g.twoDigitFloat, rstrip, roundToFixed, formatLocale etc
For e.g. ifilterfalse, izip, next, reduce, groupby, every, cycle, StopIteration etc
- Logging –Notifying about alert()
For e.g. Logger.prototype.addListener, alertListener, logFatal, logLevelAtLeast etc
- LoggingPane –Making logging pane interactive
For e.g. LoggingPane.prototype.closePane, createLoggingpane etc
- Selector –for selecting elements with CSS selector syntax
For e.g. findDocElements, Selector, Selector.findElements etc
- Signal –for event handling in universal way
For e.g. event, srs, stop, key, relatedTarget, disconnectAllTo etc
- Style –For seamless CSS manipulation
For e.g. Coordinates, Dimensions, makePositioned, setElementPosition, setOpacity etc
- Sortable –To sort and create tables
For e.g. SortableObserver, Sortable.create, Sortable.destroy etc
- Text –For helper functions and string formatting
For e.g. FormatPatternError, truncate, startsWith, padRightt, padLeft, formatValue etc
- Visual –for interactive visual effects
For e.g. roundClass, slideUp, pulsate, Opacity, Move, Scale, Highlight, Transitions, Sequence etc
The Release version was launched in 2008 as 1.4.2 version in which there has been upgrade in MochiKit.Style and MochiKit.DOM. In future release versions, the old APIs get removed for backward compatibility. To get the developed version, you can customize in git repository i.e. the git hub.