In the last week or so Valerio and others (myself included) have been working on the changes that are headed for MooTools 1.3. You can dig around in git-hub in various developer branches and see some of this stuff flying around, but frankly, it’s all in rough draft mode and is likely to change. Read the rest of this entry »
Archive for the ‘3rd Party Libraries’ Category
The MooTools 1.3 Upgrade Path
January 23rd, 2009 by Aaron N.SubtleTemplates for MooTools
January 23rd, 2009 by Aaron N.Thomas Aylott has been busy on some nice functionality that helps you drive dynamic content through templates and keep them updated in the DOM whenever their relevant data changes. Check it out in the git-hub repo. Very slick: Read the rest of this entry »
What’s the Recipe for a “Healthy” Community?
January 21st, 2009 by Aaron N.In all the chatter in the last day about what’s up with MooTools, which is a topic that’s been on my mind for a while (i.e. how to explain that there’s actually a lot going on, if you ask me) I keep coming back to the same refrain that I have seen posted all over the place: that the MooTools ‘community’ leaves something to be desired.
What, exactly, is that? I’m curious. As someone who cares about evangelizing the software to which I contribute so much, I find myself considering what else we could or should be doing. Read the rest of this entry »
Private Variables Mutators for Class
January 21st, 2009 by Aaron N.A while back Nathan White posted a Class Mutator for private variables that let you do this sort of thing:
var Secret = new Class({
Privates : {
secret : 'hidden message',
myFunc : function(){ return this.getSecret(); }
},
getSecret : function(){
return secret;
},
get : function(){
return myFunc();
}
});
var msg = new Secret();
msg.get(); // returns "hidden message"
msg.Privates.secret; // returns undefined
Yesterday Sean McArthur posted a follow up that addresses some concerns he had. Here’s an example of it’s usage:
var Secret = new Class({
Implements: [Options, Events],
Privates: {
secret: 'shhhh'
},
open: null,
initialize: function(word) {
this.secret = word;
this.open = 'not a secret';
},
getSecret: function() {
return this.secret;
},
setSecret: function(newWord) {
this.secret = newWord;
this.notSecret = 'im a new prop in this';
},
getOpen: function() {
return this.open;
}
});
I haven’t really dug into either solution so I can’t say which one I prefer, but it’s nice work regardless.
What’s Up With MooTools
January 21st, 2009 by Aaron N.There’s a post over on Ryan Rampersand’s blog today entitled “State of the MooTools” wherein he responds to a comment left on an earlier post he made (MooTools is not dead) and ponders the state of the library:
I want to know what people think of the State of the Mootools. My feelings shift often. I wrote a new edition of the mooWalkthrough; I love moo that much. Other days, I wonder where it’s heading and where to find things. Where is everyone? While we don’t need a super leader, we do need someone to give us regular mootoolers some direction. More than what the core team has done so far.
What are your feelings on the direction of Mootools? The community, the library and the current feeling that Mootools gives off?
I’d like to talk about MooTools a bit and touch on it’s current state, but this requires a little bit of history, so bear with me. Read the rest of this entry »
For your consideration: $type methods
January 18th, 2009 by Aaron N.I don’t know why, but I find myself annoyed very slightly by having to type this often:
if ($type('foo') == 'string') ...
On a lark, I whipped this up:
$type.types = ['string', 'element', 'textnode', 'whitespace', 'arguments',
'array', 'object', 'string', 'number', 'date', 'boolean',
'function', 'regexp', 'class', 'collection', 'window',
'document'].map(function(type){
$type[type] = function(val) {
return $type(val) == type;
};
return type;
});
This provides the ability to do:
if ($type.string(('foo'))) ...
Which saves me a whopping 3 characters, but feels nicer for some reason. Technically, I should name that method .isString(‘foo’) but whatever.
I don’t think I can bring myself to publish or use this one. I like it, but it just doesn’t seem to be worth it.
Nice Framework Comparison (mostly on selector speed)
January 16th, 2009 by Aaron N.Peter Velichkov has a nice post up comparing all the frameworks (MooTools, jQuery, Prototype, YUI and Dojo). It’s 1 part Slickspeed comparison and 1 part general round-up of links to and quotes from various articles that are comparing various frameworks and discussing their merits.
As my previous post comparing Dojo vs JQuery vs MooTools vs Prototype got quite popular and was included in the Wikipedia’s Comparison of JavaScript frameworks article I decided it is about time to update it with some fresh data and browsers.
For the performance part I used the same tool as before – Slickspeed. If you have forgotten, it tests the selectors which are essential part of any Javascript framework. Currently Slickspeed includes the following frameworks: MooTools 1.2, JQuery 1.2.6, Prototype 1.6.0.2, YUI 2.5.2 Selector beta and Dojo 1.1.1. Unfortunately some of those are not the latest versions but still are quite recent and I am sure the guys will update it soon. The good news is, as you can see from the list, now it includes YUI which is really strong competitor.
5 Advanced Techniques for MooTools Development
January 13th, 2009 by Aaron N.The documentation for MooTools is robust and covers nearly everything in the library. There are a few items left out that are either not there on purpose (because they are not guaranteed to be supported in future releases) as well as several standard JavaScript techniques that can empower your development. Here are 5 things that you should know that aren’t obvious. Read the rest of this entry »
Comparing Prototype to jQuery
January 13th, 2009 by Aaron N.David Nolen just posted this to the MooTools Google group:
Well thought out blog post about why Prototype is preferred over jQuery. Not a mindless flame war piece, but a reasoned argument. Interestingly enough, MooTools actually _combines_ what he likes about Prototype and jQuery into one package! In particular, MooTools has a uniform design throughout, inheritance, a great CSS selector engine, good functional aspects, supports function chaining, and of course provies a couple of things that Prototype doesn’t properly have (multiple inheritance via Implements). I pointed some of these things out in a comment.
Good recommended reading.
David
MooBugger – the MooTools JavaScript Console
January 13th, 2009 by Aaron N.This is actually kind of old news, but it’s something that never really got released. Valerio and I spent a few weeks a while back putting together a bookmarklet that would give you a Firebug-style JavaScript console for browsers without Firebug (IE, Safari, etc).
It supports console.log statements in the various formats that Firebug supports (“console.log(‘foo: %s, bar: %o’, foo, bar);”) and is really useful for debugging your code in non-Firebug browsers. I like to use it in conjunction with X-RAY to solve layout issues, too.
To use it, all you need to do is drag the link on the bookmarklet page into your bookmarks and then click it on any page to bring up the console (I.E. you have to right click and choose “Add to Favorites”).
You can see it in action on the test page.
Note: If you have Firebug installed and enabled, it doesn’t do anything.