Home arrow JavaScript arrow Page 3 - 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.Color and More
(Page 3 of 4 )

MochiKit.Color provides a useful abstraction layer for working with colors or strings that represent colors, as well as the full CSS3 color implementation. It standardizes color representations of RGB, HSL, SVG, HEX and HSV by setting any color to a value between 0 and 1. It was inspired by the NS color object from the Apple Cocoa environment.

MochiKit.DateTime provides an easy method for creating date objects from ISO 8601 timestamps and ISO8601 time strings and for converting them to the other way around. It also provides methods for converting American date strings to date objects.

MochiKit.Format provides some useful functions that deal with formatting strings and converting numbers to strings. It allows you to truncate a decimal number to a fixed precision as well as just rounding it, and provides a useful number formatter that formats numbers according to a specified locale or the local systems locale. This module is loosely based on the Number Format Pattern Syntax from Java.

MochiKit.Iter provides a standardized method of iterating over anything and was inspired by the iteration protocol of Python and the itertools module. The API for this one is huge and, as well as containing a lot of functional programming not found in MochiKit.base, contains a range of methods for grouping, sorting and chaining which return arrays from iterable objects.

MochiKit.Logger addresses the lack of native support of a standard console in JavaScript to log statements to. It removes the need for using alert() for debugging purposes and allows you to log all messages to the browser's native console. You are able to log debug, info error, fatal and warning messages to the log. The next module MochiKit.LoggingPane is used in conjunction with the previous module to provide somewhere for you to display the output of the logger, which can be inline with the page or as a popup.


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 6 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials