Moo.

I love MooTools. I’ve never been one to jump on bandwagons (like frameworks). I always hand-rolled my own JavaScript behaviors. Many months ago now, I decided to give a JavaScript framework a whirl so I began taking a look at what was available. After having reading numerous opinion posts on other blogs, visiting the actual frameworks’ sites and reviewing pros and cons of each, I finally settled on MooTools. As seems to be the case a lot lately, I feel like a giddy nerd arriving late to the party.

MooTools.net

In choosing a framework, I tried to consider several factors:

  • Size
  • Features
  • Good documentation
  • Active development & community

Then I started looking at the major frameworks: Prototype, jQuery, MooTools and YUI. Keep in mind I’ve not used any of the other frameworks, so as you read my opinion, understand that it’s simply my impression of the framework not my experience with it.

Prototype is, of course, the big daddy framework. Its been my understanding that Prototype got the JavaScript framework ball rolling. After its use on several sites, the new framework alternatives started to spring up. The biggest drawback I found is it’s massive size. As of this writing, the latest version (1.60) is 124KB!! I can’t imagine or justify adding that amount of overhead to any website. For a local web app, sure, but not a smaller scale marketing site or business site. It’s just way too much. For me, size alone ruled Prototype out.

That brought me to look at jQuery and MooTools. I have to admit, I barely even looked at YUI. It seemed like more of a collection of framework components nested in gigantic namespace hell. I respect that they want to preserve namespace, but in a larger implementation, how much extra coding (and typing) does it add? I shudder to even think about it!

So back to jQuery and MooTools. Ease of syntax and the small footprint of both packages made them both seem to be on even footing. In the end, I was literally won over by the attention to detail on the MooTools website. Not only does their site employ their framework, but the component downloader for the framework showed the depth of thought they put the product. The ability to customize the framework to suit specific needs for that extra bit of byte-savings is really a priceless feature and it’s all thanks to that deployment system. I should note several of the frameworks do this with custom classes and plugins, but MooTools deployment system is way ahead of the others.

So my dubious dabbling with frameworks has ended up in quite a pleasant surprise. Not only did it win me over to using frameworks, it’s been added to my regular arsenal of development tools. It’s been so easy to pick up that I am literally salivating to develop with it. And I haven’t looked back. MooTools rocks! That said, it’s not without a few rough edges. I’ve found some incomplete functionality here and there, but nothing I couldn’t work around. It helps that I’ve been developing in JavaScript for so long that I’m proficient enough to extend the framework’s capabilities.

So what’s the big deal with JavaScript frameworks? For the most part, I find two major benefits: ease of development of otherwise complex functionality (animations, custom interface behaviors) and cross-browser compatibility. If I were to develop the same functionality from scratch, the largest time cost would definitely sink into making things work cross-browser. Frameworks (for the most part) = guaranteed cross-browser behavior. MooTools certainly provides a heaping dose of both.

If you’re shopping for a framework, I’d recommend either MooTools or jQuery. Both have similar syntax and design philosophies and a small download footprint. I’m biased to MooTools because it is what I know and have used, but I can’t really see any negatives to jQuery from what I have read about it.

I’m curious to know about other’s thoughts on the major JavaScript behaviors, so if you’ve had some experience with any of them, I’d like to hear about it. Post a comment and let me know how things worked out for you.

No Comments

Leave a Reply