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
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
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.
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?
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.
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.
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!
It’s taken far longer than I originally had hoped, but we’ve finally managed to tackle a few big changes here at clientside.
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.
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 »