Tuesday, October 20th, 2009

Cloudera Desktop, MooTools Update

Category: MooTools, Showcase

<p>Aaron Newton of MooTools fame is now at Cloudera, the awesome Hadoop startup, and has posted about the rich Cloudera Desktop project he has been working on.

In the post he discusses the implementation and how it uses new features in the new MooTools 1.2.4 release such as:

MooTools Depender

MooTools ships with a dependency map that powers its download builder. The modular nature of the library yields itself to custom builds, putting together a library specific to the task at hand. This allows MooTools to power, for instance, a mobile application with only a small amount of JavaScript. For the Cloudera Desktop, we knew we were going to end up with a LOT of JavaScript, and loading it all on startup didn’t make much sense. Instead, we authored the Depender application. It’s an easy-to-deploy, real-time library builder and dependency mapper. This allows our application to load with a minimum of JavaScript. When users launch specific applications, Depender loads any dependencies for that app that aren’t loaded already, and then display the application. In addition to the server side component (available in both PHP and Python/Django), there are two client side components: a stand alone version to be released in MooTools 1.2.4 and a server side application that ships with a client that talks to the server for you, which lets you do this slickness:

javascript
< view plain text >
  1. Depender.require({
  2.     scripts: ['DatePicker', 'Logger'], //array or single string for one item
  3.     callback: function() {
  4.         //your code that needs DatePicker and Logger
  5.     }
  6. });
  7. //later, you need to load more dependencies...
  8. Depender.require({
  9.     scripts: 'Fx.Reveal', //array or single string for one item
  10.     callback: function(){
  11.         //if, for some reason, Fx.Reveal is available already,
  12.         //then this function will exeute immediately, otherwise it will
  13.         //wait for the requirements to load
  14.         $('someElement').reveal();
  15.     }
  16. });

MooTools ART

MooTools at the moment doesn’t have an official, public UI system, but that’s changing, and in no small part due to our contributions to the MooTools ART project. MooTools ART is an in-development UI library that currently outputs canvas. It’s an abstraction of the canvas API and it allows developers to make style-able UI elements like buttons, windows, and icons. At the moment it only outputs to canvas (limiting its support to browsers other than Internet Explorer), but we’re working on wrappers for VML and SVG.

In addition to these drawing tools provided by the ART API is a widget-based system that has numerous features including keyboard management, event bubbling, custom styling, and more. This widget system is the foundation for many of our UI elements, though not all of them. While the basic ART API was developed by the core MooTools Team (of which I am a part), we’ve contributed most of the widgets available in the library built with that API, including a window manager, a history interface, pop-ups for alert, confirm, and prompt, split views and more.

What are the major changes in MooTools 1.2.4?

  • Browser feature detection favoured over browser user agent sniffing
  • Added Trident 6 (IE8) detection
  • Request can take an instance of URI as a url
  • JSON.stringify and JSON.parse native methods are now accessible
  • DomReady always fires before load event
  • Fix for creating a Request in early versions of IE6
  • Fixes and optimizations for Element.getOffsets

Related Content:

Posted by Dion Almaer at 8:30 am
4 Comments

++---
2.8 rating from 51 votes

4 Comments »

Comments feed TrackBack URI

I’ve got to say, the MooTools Art-powered interface used in Cloudera is very, very, sexy. And the code that powers it [http://github.com/anutron/art] is very clean, elegant, and “Moo”. Can’t wait for MooTools 2 & Art’s release.

Comment by barryvan — October 20, 2009

As always, Mootool pushes the framework envelope forward into new territory. Great release anutron and the rest! Can’t wait to enhance my apps with ART as the heart of the UI driver.

Quick! Copy that and put a J in front of it! jk, lol ;)

Comment by csuwldcat — October 20, 2009

oh lovely jobley.

Comment by christoff — October 21, 2009

Leave a comment

You must be logged in to post a comment.