Got an email from Xavier Lecomte this morning that his MooTools book is now available. In French. As my French is terrible I’m a poor judge of it’s quality, but Xavier has been emailing me questions and details over the past several months and seems like a bright guy. If French is your native tongue and you’ve been waiting for some MooTools knowledge, I’d say this is worth checking out. Here’s an excerpt if you care to peruse it.
Archive for the ‘Reference’ Category
MooTools pour le français
June 19th, 2012 by Aaron N.Advanced Debugging w/ JavaScript
February 4th, 2009 by Aaron N.I have in my drafts lists in wordpress here an article called “Debugging JavaScript” that I started in April of 2007. I got about half way through the article and realized it was a daunting subject and I didn’t have time to do it justice that day. Thereafter, whenever I logged into worpress to write something, that draft would be staring me in the face. Taunting me. I’ve always wanted to go finish it, but just could never bring myself to really write it the way it needed to be written.
Well, thank god for A List Apart, who published an awesome article today on Advanced Debugging w/ JavaScript. Whew. It’s like a weight has been lifted from my shoulders.
When used effectively, JavaScript debuggers help find and squash errors in your JavaScript code. To become an advanced JavaScript debugger, you’ll need to know about the debuggers available to you, the typical JavaScript debugging workflow, and code requirements for effective debugging. In this article, we’ll discuss advanced debugging techniques for diagnosing and treating bugs using a sample web application.
TOC for Expanded MooTools Book – Feedback?
December 12th, 2008 by Aaron N.As I mentioned in a previous post, Apress wants me to embiggen the MooTools book. It’s worth noting that the previous book was on their “firstPress” label which is intended to introduce people to an emerging technology. These books are supposed to be about 150 pages long (and I’ll point out the font for this imprint is HUGE). When I was about 50-60% through writing my book, I’d already passed that threshold and my deadline was rapidly approaching. Consequently, by the time I got to the good stuff – robust code examples of how to write classes and that sort of thing – I had to stop writing and hand it off to the publisher.
The book has done relatively well for their “firstPress” imprint – and, to be clear, I have no idea how many even sold. Apress says the few indicators they have imply that it’s doing well. Let’s just say the publishing industry doesn’t exactly give or generate real-time stats. Anyway, they asked me to go back and finish what I wanted to and add several more chapters to the book. The full Apress imprint means things like, oh, a font size aimed at readers under 60 and an index, which the current book suffers without.
I’ve been contemplating what I’d like to add to the book and decided that I want to answer a different question. The current book answers the question, “What is MooTools and how does one use it?” What I’d like to answer in this addition is, “How do I – me, Aaron Newton – use MooTools and what have I learned by writing a lot of code with it?” I want to share the ins and outs of how I build web sites that are heavily scripted.
So, with that in mind, here’s my current TOC draft. I’d greatly appreciate any input. What chapters here would you skim through or skip entirely? Which chapters would you be eager to turn to first?
I’ll note that the first section of chapters – those without descriptions – are basically the current book’s contents. I invision most of the new chapters as being relatively brief with a few exceptions.
Part 1: Learning MooTools
Chapter 1: Getting Started with MooTools
Chapter 2: Reviewing MooTools
Chapter 3: Shortcuts and Helpful Functions
Chapter 4: Native Objects
Chapter 5: Elements
Chapter 6: Utilities
Chapter 7: Classes and Inheritance
Chapter 8: Getting Started with Classes
Chapter 9: Fx
Chapter 10: Request
Chapter 11: Plug-Ins
Chapter 12: Third-Party Plug-Ins
Part 2: Using MooTools – Real World Examples
Chapter 13: A Simple Use Case
This is what Chapter 13 is now; an example of a simple page with a simple use case. From this we turn our use case into a class in chapters 14, 15, and 16.
Chapter 14: When to Write Classes – Programming to Patterns
This covers my perspective on when to write classes (i.e. as often as possible) and why.
Chapter 15: Writing a Tab Class
Applying the thinking from Chapter 14, we turn the use case in Chapter 13 into a class (this is basically what chapter 14 is now)
Chapter 16: Writing Flexible Classes
Here I cover extending classes (currently chapter 15).
Chapter 17: Using Mixin Classes with Implements
A deeper look at using Implements and how you can use it to reduce your work.
Chapter 18: Best Practices for Classes
Do’s and don’ts for classes.
Chapter 19: Integrating Your Work with MooTools
Extending MooTools classes (without altering the actual MooTools codebase) to add functionality to them.
Chapter 20: Extending Native Objects
When, in your own codebase, it makes sense to extend String, Element, etc.
Chapter 20: Avoiding Repetition
How to let your code do your work for you.
Chapter 21: Organizing and Extending Numerous Classes
Managing families of classes.
Chapter 22: Controller Classes and Global Methods
Writing super classes and static methods that will control numerous instances of other classes.
Chapter 23: Hidden Secrets in MooTools
Undocumented functionality in MooTools that you can tap into.
Chapter 24: Debugging and Solving Problems
Using Firebug and other debugging techniques to figure out what’s not working.
Chapter 25: Test Driven Development
Writing code against unit tests and their benefits.
Part 3: Building Your Site Well
Chapter 26: Organizing Your Site’s Code
Namespacing, anonymous closures, and other methods for making your codebase easier to manage.
Chapter 27: Defining The Defaults For Your Environment
Overwriting the default options and states for existing classes in your environment.
Chapter 28: Unobtrusive Designs
How to build your site to work when JavaScript doesn’t.
Chapter 29: Ajax Inside and Out
A closer look at writing applications that make heavy use of Ajax.
Chapter 30: Things to Avoid
A laundry list of pitfalls and tempting design patterns that can get you into trouble.
Chapter 31: Where to Learn More
This is what is currently in chapter 16.
Appendix: Core Concepts in JavaScript
Embiggening the MooTools Book
November 18th, 2008 by Aaron N.So Apress, publisher of my book on MooTools, has kindly asked me to consider upgrading it from their “firstPress” imprint to their main Apress book line. This would involve adding more content to it among other things.
So I’m curious. To those of you out there who have read the book, what do you wish were different about it? What do you wish there were more of? When you finished it, what lingering questions were still on your mind?
Do tell.
MooTools cheat-sheets and offline documentation
October 13th, 2008 by Aaron N.MooTools 1.11 used to have a doc viewer in the svn repository that isn’t there for MooTools 1.2 (I’ve still got it in our repository if you want it). Well, some industrious soul created a chmox file for the 1.2 docs.
There’s also a PDF cheat sheet for both the MooTools core and the plugins.
Stack Overflow (Q&A for coders) launches. Tres awesome.
September 15th, 2008 by Aaron N.Joel (of joelonsoftware.com) writes of one of his latest endeavors: Stack Overflow, a Q&A style site for developers and, I must say, I’m excited about it. I want to go answer a bunch of questions right now! …except that they already seem to be answered (at least on the topics that I could answer…).
He writes in an announcement today:
You know what drives me crazy? Programmer Q&A websites. You know what I’m talking about. You type a very specific programming question into Google and you get back:
- A bunch of links to discussion forums where very unknowledgeable people are struggling with the same problem and getting nowhere,
- A link to a Q&A site that purports to have the answer, but when you get there, the answer is all encrypted, and you’re being asked to sign up for a paid subscription plan,
- An old Usenet post with the exact right answer—for Windows 3.1—but it just doesn’t work anymore,
- And something in Japanese.
If you’re very lucky, on the fourth page of the search results, if you have the patience, you find a seven-page discussion with hundreds of replies, of which 25% are spam advertisements posted by bots trying to get googlejuice for timeshares in St. Maarten, yet some of the replies are actually useful, and someone whose name is “Anon Y. Moose” has posted a decent answer, grammatically incorrect though it may be, and which contains a devastating security bug, but this little gem is buried amongst a lot of dreck.
Well, technology has gotten better since those discussion forums were set up. I thought that the programming community could do better by combining the idea of a Q&A site with voting and editing.
Would it work? I had no idea.
…
Every question in Stack Overflow is like the Wikipedia article for some extremely narrow, specific programming question. How do I enlarge a fizzbar without overwriting the user’s snibbit? This question should only appear once in the site. Duplicates should be cleaned up quickly and redirected to the original question.
Some people propose answers. Others vote on those answers. If you see the right answer, vote it up. If an answer is obviously wrong (or inferior in some way), you vote it down. Very quickly, the best answers bubble to the top. The person who asked the question in the first place also has the ability to designate one answer as the “accepted” answer, but this isn’t required. The accepted answer floats above all the other answers.
Browsing over on the site (stackoverflow.com) there are a bazillion questions on all topics imaginable (well, actually, now that I look, there aren’t any MooTools questions yet). Looking at the questions posted about JavaScript in particular, they range from stuff that people really should know if they are writing ANY javascript to stuff that would take too long to really answer well to that’s some esoteric stuff that I know the answer to and could be helpful if all these other smarty-pants hadn’t already answered it.
It all boils down to this though: it works, and it’s awesome. One place to tap into knowledge about any development platform out there and get the most relevant answer to your question. Seriously, go check it out, post haste!
Clientside Relaunch, Updated WikiTorials, and a Book!
August 13th, 2008 by Aaron N.Greetings all.
It’s taken far longer than I originally had hoped, but we’ve finally managed to tackle a few big changes here at clientside.
Redesign
First, there’s a new design. It’s not really much different than the old one, but it’s a bit cleaner and crisper. You should really notice the change in the wikitorials.
Mootorial.com; Updated Wikitorials
Speaking of the wikitorials, we’ve relaunched those, too. You’ll find that all our code for MooTools 1.2, which we relaunched in June, now has tutorials and demos. We released the code when it was ready, but only just now managed to re-author all the tutorials, which were sadly out of date.
Then there’s the MooTorial – the MooTools tutorial that has drawn so many of you here. It’s now moved, officially, to www.mootorial.com. It’s still a part of Clientside and brought to you by CNET, but now it’s seperate from our code and much better organized (and updated for MooTools 1.2, of course).
The MooTools Book!
Well, it took waayyy longer than I would have suspected, but the MooTools book is finally here! You can purchase and download the PDF of the book immediately, or order the paper version, which comes out in the next day or so. You can get the PDF from Apress (the publisher) or order the paperback from Amazon.
The book is over 250 pages of step-by-step instructions on how to use MooTools. It’s similar to the Mootorial in that it covers every class and method in the library, but it’s far more detailed and designed for both advanced programmers and beginners. Hopefully you’ll find it a useful reference and an easy read.
$merge, $extend, Class.extend, Class.implement, Native.implement
March 28th, 2008 by Aaron N.So I was asked yesterday the following:
Why does Browser use merge but Element use implement?
And after composing a lengthy reply, I thought it might be useful to post it for others: Read the rest of this entry »
Snook: Accelerated DOM Scripting w/ Ajax, APIs, and Libraries
October 9th, 2007 by Aaron N.About a year and a half ago I started focusing on javascript again. I’m not really a developer here at CNET (though you’d be hard pressed to tell) but javascript was a means to an end and I didn’t really have anyone here that could do the work, so I rolled up my sleeves, unaware that I’d be spending this much time on the subject. It’s a good thing I find this stuff fun.
Anyway, over the course of that time I learned a lot of the ins and outs of writing javascript well. I blogged about many of these discoveries along the way here on this blog. But if you’re just getting started with javascript, or you suspect that you’re writing things without really understanding them, or maybe you’re using javascript the “old way” or whatever, where do you start?
All my tutorial work just assumes that you know a lot of these ins and outs and doesn’t spend much time talking about the whys of “new” javascript methodology.
Over my lunch break I thumbed my way through Jonathan Snook‘s Accelerated DOM Scripting with Ajax, APIs, and Libraries and if you feel like you need a primer on how to do “modern” javascript, it’s a great starter book. It covers a lot of stuff from the DOM to Ajax, closures and more.
It touches on Libraries (prototype, YUI, jQuery, Mootools, etc.) but it’s not going to teach you to use them. Instead it shows you a lot of the conceptual stuff going on in frameworks and helps you understand modern browsers and the javascript concepts that they implement.
If you’re just getting started with javascript, I highly recommend it. Even if you’re already using a framework, you can pick up some good practices from the examples and illustrations and detailed under-the-hood information.
Despite it being a rather technical book, it’s written so that even if you’re new to javascript you can learn a lot from it. It will help if you have experience with programming in general, as it assumes you have a general understanding of object oriented practices, but beyond that the book is very approachable.
-A.N.
Latest mootools tutorial: how to write a Class
June 25th, 2007 by Aaron N.Here’s a step-by-step and line-by-line example of how to write a Mootools Class. I wrote this example for a javascript class I taught here at CNET for our developers and figured I’d share with everyone else.

