TOC for Expanded MooTools Book – Feedback?
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
Follow @clientcide on twitter to get notified of new posts.
To follow me personally on twitter, follow @anutron.
December 12th, 2008 at 3:14 pm
Hey Aaron, that sounds rather interesting actually. I wouldn’t have thought to buy a book on Mootools, because I feel the docs do a pretty good job of helping my explore Mootools when its not obvious. But some real life examples might be interesting.
Tell me, do you think this would be targeted at veteran developers? Or more at people who want to learn Mootools?
December 12th, 2008 at 3:44 pm
Hi Sean,
Well, the first half of the book (which is basically the current book) is aimed at programmers who want to learn MooTools. The new stuff – the second half that I’m starting now – is aimed at people who really want to know the framework inside and out and want to make the most of it. It’s a little more personal in that I hope to capture my own coding style and reasons for that style, but also aimed at addressing common patterns that emerge when you write a lot of JavaScript.
December 12th, 2008 at 9:23 pm
I’m more anxious on seeing the second half, but every time I re-read the the first print I always catch myself thinking “why didn’t I just use this function?”
Will all due respect, my only concern with your next print is the “building your site well” – it seems a little out of place for a book that focuses on mootools, and it feels like it should be its own book instead of a part of a javascript framework book (except for coding unobtrusively with mootools).
December 12th, 2008 at 11:24 pm
I think you’ve got a good TOC here. I agree with Keith about part 3, though I see that as a little extra to push the reader in a different direction with their code.
December 13th, 2008 at 1:44 am
Hi Aaron,
Glad to hear your thinking of adding to the book, I have the first which makes a decent addition to my bookshelf, I’ve been using mootools for a while but I found it filled in some of the gaps by being able to essentially go back to the beginning and look at the framework from the ground up
I definitely think the additional chapters you list are the natural progression for the book. One point though, you list unobtrusive designs as one chapter, whilst this is obviously a very important point, I just wonder if it may be outside of the reamit for a book focusing on Mootools as a framework (building without javascript is a relatively generic affair?)
I would however love to see something on accesibility/usability within javascript heavy applications (faux history etc)
Keep up the good work!
/Matt
December 13th, 2008 at 7:38 am
I’m a designer who just started to get his geek on with PHP and MooTools in the last 8 months with zero experience programming (though I know html and css quite well).
The book looks promising. I would flip to classes because it seems all the mootools things I download (like remooz, etc.) don’t look at ALL like my code, and I still don’t have my head wrapped around how a class works but I’m sure I will love them when I figure them out.
MooTools seems to attract designers like me who cried every time they attempted to learn javascript. Then we see mootools and copy/paste their demos and switch the 3 parts of the code we understand and pat ourselves on the back.
It gets frustrating for us to buy a book and nothing makes sense since most books assume the reader knows a language or two already.
I’ve figured out how to get mootools to do what I want, and I’ve written some pretty complex apps with ajax, dynamic forms, fx and all sorts of crap all over the place and I still don’t even know how to write a “Hello World” script with pure JavaScript.
I know I can type $(‘messages’).set(‘text’,'new message!’) but I have no clue how any of that is JavaScript. If a book says something like “.set is just a javascript [lingo I don't know]” it wouldn’t help me very much.
Not sure what I’m trying to say here, but I think I’m saying “don’t assume because your reader is interested in MooTools that they know jack about JavaScript”.
Cheers!
December 13th, 2008 at 10:45 am
Hmmm. Maybe Chp 26 and 29 don’t belong. They aren’t about MooTools really but more about building sites with JavaScript in general. That’s something I’ll have to chew on.
December 13th, 2008 at 11:04 am
@cheers (open id user whose name isn’t shown)
The current book is definitely aimed more at you. It outlines what everything in MooTools does and how to use it and when to use it. You’ll get more out of it if you do know how to program, but if you don’t it’s still the best place to start. The part I’m starting now is more advanced in many ways, but I think it will contain a lot of information that will help you write code that is easier to maintain and organize.
December 17th, 2008 at 5:13 pm
I think Part 3, with all of its proposed chapters, is fantastically appropriate. Absolutely I agree: some of the chapters are not necessarily Mootools-centric. But the way I read the TOC, I gather that this book is committed to helping people to be uber competent MooTools developers. All of these topics, including those of part 3, are relevant to that end.
I read that list and every chapter resonates with me. They all leave me with the sense of “woah yeah, I’ve dealt with that–how do the experts deal with that?” or “sweet, I’m curious to learn some good patterns in that area.”
Let’s be great Mootools developers. Even from my limited experience I know that, sooner or later, being proficient in every one of those topics supports that.
December 17th, 2008 at 5:25 pm
Nice feedback John. Now all I have to do is write it all…
December 17th, 2008 at 6:21 pm
I think part 3 is a must for both people new to Mootools & AJAX development, and those who want to graduate to Mootools mastery. Best practices make learning a new technology easier to grok, but aren’t always easy to come by in one canonical form.
Make part 3 that canon!
February 3rd, 2009 at 3:06 am
I really enjoyed reading the book and often thought “why didn’t I discover that earlier” ;-)
At some parts, the examples were not too helpful. Which Ninjas, some functions are quite good to understand and usually they can be transfered easily, but for other parts I missed examples that are more orientated to real web applications and their challenges…
And I definitively miss an index to be able to use the book as reference – you often think “I read something about this somewhere – but where to find it?”, so if you rework the book, this would be very helpful (and I really appreciate if you had the chance to publish an index for the current book somewhere as download)