June 23, 2007

Interview with Jonathan Snook

Jonathan Snook is a freelance web developer living in Ottawa, Ontario, Canada. His very popular blog cover topics such as CSS, JavaScript, PHP, Open Source, etc. He is also a web columnist for Digital Web Magazine, and has co-authored The Art and Science of CSS and Pro DOM Scripting with Ajax, APIs and Libraries. Jonathan was nice enough to give me some of his time to answer questions about JavaScript and libraries.

JW: For the newbies out there, can you give us a brief description of what JavaScript closures are?

Jonathan Snook: Closures are a handy way of accessing variables declared outside the function from inside the function. So, if function B is declared inside function A, B will have access to any variables declared in A. Very handy stuff.

JW: Any thoughts on the new Spry framework from Adobe? Does it help the legitimacy of JS libraries now that it is included in Dreamweaver?

Jonathan Snook: I haven't looked at the Spry framework in any depth but it's inclusion in Dreamweaver is both good and bad. It's good to see (what I can only assume) a solid library getting implemented in a major development tool. They're both targeted at the same market: designers. I don't think it necessarily affects the JavaScript library landscape much. Its use of the newer and more common object-oriented JavaScript coding style is a huge plus, though. If they haven't already, it'd be great to see their other core code get updated into a central namespace.

Where I see the danger is in poorly implemented solutions by those using Dreamweaver without understanding the technology or the consequences of those solutions. This has always been a problem with GUI-based development.

JW: With your Prototype and Mootools cheat sheets you created, can we assume these are your two favorite libraries? What makes them so great?

Jonathan Snook: Actually, I'd consider myself library agnostic. I use the best tool for the project, which has included Prototype, Scriptaculous, Mootools, jQuery, YUI and Ext. Each has certain strengths and it's nice to pull from each one as need be. For example, I like using Prototype with data-rich applications. Whereas, if I need some quick interactivity, dropping in Mootools or jQuery is worth it.

JW: Do you mainly use Firebug for client side debugging?

Jonathan Snook: Firebug is by far the best tool I've used for client-side development. It has saved me countless hours and has been a godsend for tracking down stubborn problems. It still has its issues, mind you, but what is there is fantastic. I'd love to see a similar tool find its way into the rest of the popular browsers. I've been meaning to do a screencast covering some of the stuff I do within Firebug… one of these days. I suspect many people have yet to discover the true power that lies within. As it is, there are still many features I've yet to use that I'm sure would be very useful.

JW: What web developers/designer really inspire you?

Jonathan Snook: I take inspiration from everywhere and wish I could learn more about how people pull off the things they do. That's the great thing about going to conferences like SXSW; I get so much inspiration and energy from everybody that it makes me giddy. Like Shaun Inman. He's managed to build a decent web application and make money at it. Or Dan Rubin who has connections. He's done great work for great clients and has also made a lot of good friends in this industry. Or Jeremy Keith, public speaker extraordinaire. He's in demand, flying around the world to talk about what he loves.

It certainly gives me much to look forward to.

JW: When should JavaScript namespaces really be used?

Jonathan Snook: Always! It has become such a habit for me that I don't really program any other way now. It's a handy way to encapsulate and claim ownership to a block of code. It keeps things more organized and offers up ways to simplify code without concern for conflicting with other JavaScript code.

JW: Where do you see JS libraries headed in the next few years? Maybe a consolidation?

Jonathan Snook: I suspect we'll see both an expansion and consolidation. More libraries will continue to be released but it will be harder and harder to achieve the mass popularity of the main libraries. At the same time, many of the main libraries find themselves achieving the same goals in the same ways. Currently, each main library has a solid strength that differentiates itself from the rest. Some are small, some are large, some are modular, and some are all-in-one. But put a "build-your-own" configurator behind them and suddenly they all begin to look the same. So, we'll begin to see some libraries drop in popularity and eventually stop being developed.

JW: With the most current versions browsers are there any specific bugs that really “bug” you?

Jonathan Snook: I don't think there is a specific bug that gets on my nerves. Once you know what the problem is, you simply work around it. For IE, I just wish that the DOM API would match what everybody else is doing. Forking code for various browsers is tiresome and is one of the reasons why JavaScript libraries have been so successful. Oh and Safari. They need to move to the latest Webkit. It's frequently a source of frustration for me.

JW: Do you feel your skills as a graphic designer give you a unique advantage as a freelance developer?

Jonathan Snook: I think being well-rounded (in the intellectual sense) is a huge asset. Understanding what the possibilities are and how best to approach specific problems go a long way to providing value to clients.

JW: I hear one of your favorite tv shows is The Simpsons. Think that show will ever get cancelled? Will Bart ever wear a different pair of pants???

Jonathan Snook: I do enjoy a good episode or two of the Simpsons. It's been consistently decent. Although seasons 4 through 6 were probably my favourite. Best episode ever: Lisa's Rival. "Here's a ball. Maybe you'd like to bounce it." Classic.

JW: Thank you so much for your time.

Jonathan Snook: Thank you very much. It's been a pleasure!