Book Report: MooTools 1.2 Beginner’s Guide
I’ve written a lot about MooTools over the last several years, the mootorial, my own book, not to mention all the posts here and loads of documentation. So you might think that I’d look at another MooTools book on the market as competition but you’d be wrong. I love that there are other people out there who want to help others learn MooTools. Writing tutorials and books is just as valuable to the framework’s growth as writing code. In the last year there have been a lot of new materials on that front now that I think about it. Ryan Florence has dedicated his blog to the topic. Mark Obcena has written a whole series called “Up the Moo Herd” that covers a lot of tips and tricks and best practices. Not to mention all the great work David Walsh continues to do (for instance, his recent post on NetTuts – “Make your MooTools Code Shorter, Faster, and Stronger” - was terrific).
So yeah, another MooTools Book? AWESOME.
MooTools 1.2 Beginner’s Guide
What do I mean by “not focusing on nuances”? It’s all the little things that come with any programming language. It’s the part of any programming solution that goes, “Here is how you solve that problem… unless you have this other condition…” For example, MooTools 1.2 does not have a unified Fx timer (this is changing in 2.0) which means that numerous instances of Fx running at the same time can compete for CPU resources, making transitions bog down and become choppy. The solution is to use Fx.Morph, for instance, when you want to transition more than one style property on a single element, but if you’re animating more than one element, you should use Fx.Elements. By not getting bogged down in this nuance, this book is more free to just say “here is how you use Fx to animate an element’s styles.”
Now, to be fair, the book does cover Fx.Morph and, in a later chapter where it covers the MooTools More plugin repository it mentions Fx.Elements. It’s not like the book doesn’t cover a lot of ground, but it focuses more on teaching with simple examples. There’s just a lot of these types of things it doesn’t cover, which makes the book kind of hard to read if you’re well versed in how MooTools works; not that you would read it if that were the case.
The book has chapters on the basics of getting the library and installing it in your pages, writing classes and using them, DOM manipulation, the Core utility functions, events, Fx, Ajax, MooTools More, and how to write your own “plugin” (which is really just more on Class usage).
This is, in the scheme of things, not a big deal. Anyone picking this book up to learn MooTools is going to get a lot of value out of it and hopefully get hooked on the power of MooTools. As they start using that power they’ll figure out how to encapsulate it more effectively in objects and classes sooner or later.