Ajax Adept:
An Interview with Fletcher Moore

Fletcher Moore

We recently spoke with Fletcher Moore, a contributor and technical reviewer on Head First Ajax.

Tell us about your involvement with Head First Ajax.

I designed and coded the book's site examples; the world's best job — there's no client haranguing you to make the logo bigger.

It seems like Ajax is used as a term pretty ubiquitously. How do you define Ajax?

Personally I prefer to constrain my use of the term to those Javascripts that communicate with a server. The rest is technically just good old DHTML. But in practice I prefer to fight my battles in the code itself rather than terminology. Non-technical people see it all as mere interactivity (actually, a good many people typically think it's Flash), and that's fine with me. Ajax pretty much resurrected DHTML, and you rarely see one without the other these days, so I have no complaints about seeing the term applied more widely. The implementation details are, after all, plenty concrete: if you need to talk to the server, you need to talk to the server, and it doesn't really matter what you call that, as long as you can make yourself understood.

The truth is, I tend to approach my work in terms of problems and solutions. The problems are things the user needs to do, and the solutions start out as boxes on a whiteboard. I can't really imagine a situation in which I would actually describe a solution with such a broad, unspecific word, any more than I would begin this answer by declaring that I'm going to be using language to explain myself — it's simply understood.

What do you think is the biggest mistake Ajax developers are making these days?

Most Ajax stuff I see on the Web is done pretty well — I think the technique is still rarified enough that it doesn't attract cut-and-paste developers. That said, I have been in a position to review the work of a few people new to Ajax and Javascript in general, and what bothers me is a tendency to rely on libraries like jQuery and Dojo without a real understanding of what is going on behind the scenes. This sort of thing creates de facto dialects of the language itself, and people wind up viewing Javascript through the lens of their particular library, ascribing to it all of the biases and limitations of that library. I think it would be a good idea for beginners to spend a little time writing small Ajax applications without a library.

It's also wise for experienced programmers to go back from time to time and find ways to solve problems without a library. I had to do this for Head First Ajax, and it was very instructive.

Do you think Ajax will still be huge, say, twelve months from now? Three years from now?

I think that Ajax is part of the glue of the Web now, and there's no more chance of it vanishing from Web development practice than CSS. That said, "huge" implies that it will still be the subject of a lot of buzz, and that will decline as people think more and more of it as a means to an end. I expect that over the coming years the novelty of Ajax will approach zero and the interest people pour into it will be focused on the end products. This is already happening with a lot of Google's work. To me the big question is whether future developments will ever wean us away from Flash. Canvas looks like it has a lot of potential, but right now there's still a point beyond which Ajax/DHTML cannot quite go. Google Maps, for example, is a beautiful, mature Ajax app, but when it came time to do Google Finance, someone recognized that Ajax couldn't quite manage what they had in mind.

Do you think Head First Ajax is effective at getting people going with Ajax?

If it gets into people's hands, it's plenty to get them rolling. I really appreciate that beginners have an opportunity to learn the basics in a sensible way — my own early education in Ajax was as much a scavenger hunt as anything else. Information was very hard to find and tended to be presented in forms that would put an accountant into a coma. Examples were difficult to comprehend or were incomplete, and I wound up spending whole days staring at code and trying to fix one little thing. I guess one could say I learned my lessons that much better, but I'm not sure I'd want to go through that again.

Now, this sounds made up, but it just happens that a couple days ago a colleague asked me if I had a good beginner's Ajax book. I handed him my copy of Head First Ajax. I guess that's a better testimonial than anything I can say here.

If you were learning Ajax, what's the first thing you'd concentrate on?

I'd focus on usability. Anyone can learn the techniques, but it takes some skill and thought to put them into action in a way that doesn't just wind up confusing people. Ajax programming is an order of magnitude more complex than static Web design — in essence you're designing apps rather than pages, and that's a leap for a lot of people that are used to making brochure sites and the like. It's like the difference between drawing cars and making them.

Usability is the keystone to good application design. Fortunately it's not magic. It can be learned by listening to the experts — Jared Spool is a favorite of mine — and it can be learned by examining the work of the masters. Google of course, but also the Yahoo Developers' Network and 37 Signals, to name but two. There are plenty of smaller developers doing great work in niches — mailchimp.com and surveygizmo.com for example.

And of course, have fun. If it's not fun, you're doing it wrong.

Now Available:
Head First Software Development

Head First Software Development Cover

Even the best developers have seen well-intentioned software projects fail. Instead of surrendering to the common problems, let Head First Software Development guide you through the best practices of software development.

Now Available:
Head First JavaScript

Head First JavaScript

Want to take your web skills to the next level? It sounds like you're ready to learn the Web's hottest programming language: JavaScript.


Sign me up!

Stay up on all the latest Head First news, tips, and special offers with the Head First Newsletter.

Get the Latest Issue:
January 2009