Recent Book Purchase

After playing with jQuery and MooTools for the last few weeks, I decided it would really help if I knew a little more about JavaScript.

And so, just a couple days ago, I found myself at Barnes & Noble sifting through books of JavaScript. I was specifically searching for the “Pro JavaScript Techniques” by John Resig book. Unfortunately, they did not have any and so I was left to sort through a bunch of other JavaScript books.

After careful analysis, I managed to narrow my selection and I walked out with two books. One: “Simply JavaScript” by Kevin Yank and Cameron Adams. Two: “Designing with Web Standards” by Jeffrey Zeldman (second edition).

Currently, I am in the process of reading the “Simply JavaScript” and it seems like a really good book. Once I’m done, or at least half way through it, I’ll do a fair review of it to let you know if it is worth the time and money.

∂ meow


Tags: , ,

MooTools vs. jQuery

Which library is better?

There has been much hype over the different JavaScript libraries such as Dojo, jQuery, MooTools, Prototype and Yahoo. I’d like to focus on MooTools and jQuery as those are the two libraries I have been personally debating as of recently.

As you may already know, I am fairly new to the world of JavaScript and just recently started using jQuery. Just a couple weeks ago, I wrote my first reactions/review of jQuery and here I am today comparing it head to head with MooTools.

After much analyzing here is what I’ve come up with.

jQuery is really easy to use and learn. After just a day of playing with it, I learned all kinds of things and quickly caught onto the structure of its syntax. The syntax for jQuery is very simple, easy to understand, quite short and the chain-ability is really sweet. On top of all of that, the documentation and tutorials are phenomenal.

After researching and experimenting with MooTools, I must say that the first thing I noticed is the slightly bulky and less friendly syntax. However, MooTools seems to be great for Object-Oriented Programming and it is very smooth with it’s animations - almost a Flash-like feel. I thoroughly enjoyed their demo page when I first visited the MooTools website.

The MooTools documentation is pretty good as well, but their website did lack in tutorials. That must be largely because MooTools is marketing itself toward the intermediate and advanced JavaScript developer. But what about the beginners or the not quite intermediate developers that are eager to learn? A few tutorials wouldn’t hurt, especially, since there seems to be much complaint about the MooTools community and lack of support for the simple-easy questions that someone learning might ask.

After running a SpeedTest found on MooTools website, I found that there is very insignificant difference in the speed of MooTools vs. jQuery and it varies quite a bit from browser to browser and platform to platform. If one takes all of the results into account, overall, MooTools is a bit faster than jQuery. But what is a few milliseconds? Does that really matter?

So where is the hold up and which should you choose?

This got me contemplating on which library would really be the better way to go. I think that is totally up the the individual’s preference and the project at hand. If a few milliseconds and smoother animation really matter to you, then MooTools is the way to go.

Personally, I’m loving the ease and friendliness of jQuery and do not care too much for the slight difference in smoothness of the animation. However, if a project comes along and MooTools seems to be a better fit, then that is what I will use; but by default, I’m staying loyal to jQuery.

It is good to know or at least have a good grasp of both of these libraries, and even some of the other ones, as you never know what you might encounter with a future project or employer. By knowing or at least being familiar with several of these libraries, you’ll be in a better position to judge and decide which is more fitting for individual projects and you.

In quick summary:


jQuery:
Concise syntax
Great documentation and tutorials
Easy to learn, even for beginners
Nice plugin architecture


MooTools:
Better for OOP
Smooth animations
More advanced - harder for beginners
Overall faster

∂ meow


Tags: , , ,