JavaScript
  Home arrow JavaScript arrow Page 3 - Introducing MochiKit
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Introducing MochiKit
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2007-06-04

    Table of Contents:
  • Introducing MochiKit
  • MochiKit Modules
  • MochiKit.Color and More
  • MochiKit.Selector and More

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    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.

    More JavaScript Articles
    More By Dan Wellman


       · Hi, hope you enjoy this introduction to MochiKit, one of the smallest javascript...
     

    JAVASCRIPT ARTICLES

    - Using jQuery to Preload Images with CSS and ...
    - Using Client-Side Scripting to Preload Image...
    - Removing Non-Semantic Markup when Preloading...
    - Using the Display CSS Property to Preload Im...
    - Preloading Images with CSS and JavaScript
    - Scaling and Moving Web Page Elements with th...
    - Fading, Hiding and Sliding HTML Elements wit...
    - Toggling CSS Properties with the GX JavaScri...
    - Cancel, Queue and Pause Animations with the ...
    - Producing Elastic Effects with the GX JavaSc...
    - Moving Divs Diagonally with the GX JavaScrip...
    - Moving Elements Vertically and Horizontally ...
    - Making Bouncing Effects in Parallel with the...
    - Creating Bouncing Effects with the GX JavaSc...
    - Manipulating Background Colors with the GX J...







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek