Home arrow JavaScript arrow Page 4 - Introducing MochiKit
JAVASCRIPT

Introducing MochiKit


MochiKit (pronounced mo-chi kit) is a lightweight, fast JavaScript library that was inspired by the Python programming language. It aims to make a lot of JavaScript syntax more convenient. It was produced by Mochi Media, a company dedicated to providing tools and services that support content creators, and written almost entirely by Bob Ippolito. Keep reading to learn more about this library.

Author Info:
By: Dan Wellman
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
June 04, 2007
TABLE OF CONTENTS:
  1. · Introducing MochiKit
  2. · MochiKit Modules
  3. · MochiKit.Color and More
  4. · MochiKit.Selector and More

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Introducing MochiKit - MochiKit.Selector and More
(Page 4 of 4 )

MochiKit.Selector provides a set of utilities used to select elements by CSS selector syntax, so you can easily select elements based on attribute, attribute value, whether they are descendants of a particular element and many more items as well as standard selecting by tag name. This was originally ported in from Python, but has evolved since then.

The MochiKit.Signal module makes easy work of event handling and replaces the browser's native event API completely. It allows you to connect to any type of event and takes care of deciding which event model to use, retrieving the event object and cleaning up afterwards.

MochiKit.Style allows you to easily manipulate element styles. You can get and set styles, element dimensions and element positions, play with the opacity of elements and show and hide elements, all with easy function calls.

MochiKit.Sortable lets you create lists that can be sorted via dragging and dropping the list items and is another module ported from Scriptaculous. The API for this module is very compact, with just three methods: one to create the sortable list which will normally be based on an unordered list, one to destroy the sortable object and one to serialize the object for sending to a server via XMLHttpRequest.

The final module is MochiKit.Visual. It provides a huge range of visually appealing, engaging effects such as scrolling and sliding elements, elements that fade in and out of view, elements that shrink or grow and much more. It also provides the excellent CSS manipulation for rounding the corners of elements. This is all done with JavaScript and CSS. It works very well in different browsers and is probably the easiest part of MochiKit to use.

Conclusion

How useful you find MochiKit will depend on your knowledge and experience of JavaScript. Some of the more basic tools can be used very easily by almost anyone, but the library is very different from some available libraries in that it doesn't give you a bunch of pre-packaged solutions to common web design problems; it's not a template library. The people that will get the most out of MochiKit are people that are constantly finding that JavaScript just doesn't have the built-in tools that they need and is constantly falling short of their expectations. The documentation is pretty technical, with few paint-by-numbers examples, but there's no doubt that this is a very powerful library in capable hands.


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 4 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials