This is a really well-written book!  Here's the thing: I'm STILL a jQuery guy.  MooTools is just too heavy for me - especially how prototypical inheritance is hijacked to support a fake class-based inheritance scheme.  Here are some criticisms:

On page 72 and on page 145, we see that sometimes MooTools uses the "new" keyword and sometimes it doesn't.  I prefer to avoid "new" in JavaScript whenever possible because function constructors are far more elegant and allow the object to be self contained.  I've written about this before.

We're introduced to the Hash object on page 81.  But, Javascript already has a hash, it's called Object!  Why not just extend object rather that create a new competing datatype?

If you read this book, please if you pass over everything else, check out page 152.  The creation of a simple mixin pattern is extremely useful and is a very generic solution to lots of different problems.

No comments

Post a Comment