Join Now! It's FREE. Get full access and benefit from this site
Friday, 22 January 2010 13:17

David Walsh is a well-known, twenty-six year old, web developer in the community. In addition to his blog, he contributed to the creation of Script and Style, and is a core team member for the Mootools framework. Today, we’ll talk with him about his day-to-day workflow, JavaScript, and web development in general.
My name is David Walsh and I consider myself a flexible PHP, CSS, HTML, JavaScript (MooTools and jQuery) web programmer. I spend most of days knee-deep in code, fighting the war against rubbish web browsers and webmasters that have come before me.

I taught myself HTML, JavaScript, and CSS during my Freshman year of high school. I don’t recall why I fell in love with web programming but I simply couldn’t stop myself from tinkering, tinkering, tinkering. Ten years later I’m still obsessed with web programming and pushing each web language to its limits.
I have a normal 8-5 day job but I enjoy my few hours after work the most. It generally gives me time to take the problems encountered during the day and turn them into blog posts. My opportunities to experiment at work are limited so the freedom to tinker I enjoy after work is refreshing.
Wynq Web Labs is my consulting / freelance arm. Wynq specializes in taking your vanilla website to the next level using MooTools or jQuery. So much can be done using those (or any) javascript libraries that there’s always room to improve a basic or advanced website.

The best advice I can give is this: put down the book, open your text editor, and code. Code, code, code. Experiment, experiment, experiment. Tinker, tinker, tinker. There’s no better learning experience than sitting down, failing, fixing, failing, fixing, etc. Never stop failing and never stop fixing. I also recommend reading quality web development websites like my blog, Nettuts+, Dev-Tips, and CSS-Tricks; there’s a lot to be learned from the people that have a wealth of experience.

Yep, JavaScript has officially become my favorite programming language. I love how flexible JavaScript can be and how it can, with your favorite framework and a few quick lines of code, take a website from a 4 to a 8. There aren’t many other languages/platforms out there than can have such a big impact with a relatively short amount of time.
I took my own advice: experiment, experiment, experiment. I started off by setting a small goal for myself, failing, fixing the problem, and achieving that goal. Then it was on to the next test. I also started following JavaScript-centric blogs like mine and joined the MooTools IRC room. There really is no substitute for passion, ambition, and taking the time to experiment.
What’s great about JavaScript is that it’s the one standard for browser scripting. Some people bemoan that it’s the only browser scripting language and that we’re “stuck” with it. Think about this: if each browser handles their JavaScript implementations differently (like they do now), imagine having numerous languages within each browser handled differently. What a nightmare!
I like that JavaScript is loosely typed and that you may modify the native object prototypes. I also like that functions can be stored as variables and passed as arguments (/me glares at PHP). Most of all, I like that JavaScript provides us with the tool to battle boring websites – the only limitation to what we can do is a lack of imagination.
The most common JavaScript mistake I see is developers (or webmasters) copying a javascript snippet into the page, seeing it not work, and subsequently complaining that the code isn’t correct. Developers should take a few moments to study and understand the code – not just expect it will work. A few other mistakes I see frequently include settling for “well, it works” instead of optimizing and using JavaScript to replace server-side duties. Supplement: yes; replace: no.

I started out blogging about MooTools because I enjoyed the framework so much. About a year ago, MooTools Core Developer Aaron Newton asked me to consider contributing to the framework’s codebase and community. A month later Valerio asked me to join the MooTools team. Today most of my time is spent communicating within the team, contacting organizations about MooTools, talking with members of the MooTools community, and writing MooTools tutorials. It takes up a lot of my free time but being surrounded by some of the most brilliant JavaScript minds in the world is a welcomed way to spend it.

Absolutely! There are many places that web designers and developers can get help with MooTools. The best place is the MooTools IRC room on Freenode: #mootools. Another great place to get help is the MooTools Google Group. Most MooTools Core Developers and contributors have blogs that address basic to advanced MooTools issues. It’s difficult not to find help!

Many! There’s always room for each framework to improve. I’d like to see MooTools incorporate a dependency manager so that developers may lazyload scripts based upon needs. For example:
//javascript
$require('Drag.Move');
The above code would add Drag.Move support (and its dependencies) if not already included in the page. I know Dojo and YUI have implementations of this. I’d love for MooTools to implement this. Being a member of the team, I can’t simply wait for it to happen though.
I look forward to working with some of my colleagues to map out how we can create such a system.
Note: MooTools has released Depender, a server-side build tool that uses PHP or Python: http://github.com/mootools/mootools-depender/
Creating my own JavaScript framework simply isn’t in the cards. I’m surrounded by brilliant developers on the MooTools team and respect the work done the jQuery, Dojo, and Ext teams. I would much rather spend my time helping MooTools improve than try to reinvent the wheel.
I think that JavaScript frameworks are the entities most pushing the browsers to do better, get faster, move forward. Take a step back and think about the stuff we’re doing now with web UI that we weren’t doing a year or two ago. All this thanks to JavaScript (and a bunch very talented programmers).
Look forward to incredible progress by each of the JavaScript frameworks. We’re all in it for the long run and each day holds the possibility of a giant leap forward.
I think that CSS and JavaScript steal each other’s roles sometimes. If something can be done (reliably) with CSS, a developer should use CSS. The problem is that CSS isn’t moving fast enough (or at least in a standardized way) and our only option is to hack a solution with JavaScript. Rounded corners and opacity are great examples. Each browser has their own CSS code structure to achieve the desired functionality which makes hacking CSS inefficient. JavaScript frameworks take all the cross-browser worries away and allows us to code something and move on. I doubt this will change any time soon.
I consider myself skilled at both frameworks and prefer MooTools. In fact, learning jQuery made me love MooTools more. To each his own. MooTools just “fits” for me. I’m enamored MooTools’ OOP nature and that philosophy allows me to code faster. I also find MooTools’ code more readable due to its use of getters, setters, and action words used for method names. MooTools also allows me to create my own build, specialized to whichever project I’m working on, to minimize file size.
“In fact, learning jQuery made me love MooTools more.”
If you do not approve of Native object prototype modification (MooTools and Prototype do), jQuery’s the better choice. jQuery’s syntax is generally shorter than MooTools’. jQuery is also known for having an easier learning curve than other frameworks. I also commend jQuery for its organization, promotion, and coordination efforts – Rey Bango and his squad do a great job.
What’s ultimately important to know is that you can’t lose with either framework. I’d argue that any good JavaScript developer should be proficient in both. Best of all is that they can work together within the same page.
Sure. MooTools modifies the prototypes of some of the native JavaScript objects (Strings, Functions, Arrays, etc.) to make them more flexible and powerful. MooTools also implements a rock solid OOP Class / Inheritance system that allows you to easily extend MooTools Classes. MooTools is also very modular so you only need to download the pieces you need.
jQuery empowers elements within the jQuery object which is why you frequently see “$(this)” – “this” isn’t pimped out without the $(). All plugins are added to the $ function. Essentially jQuery is one powerful function ($) with many other functions baked into it ($.each, for example). jQuery syntax is generally shorter than MooTools syntax and the same methods are used to get and set styles, attributes, etc.
I think of it this way: MooTools takes native objects and puts them on steriods. jQuery gives them a “$” shell of power. Aaron Newton authored a great writeup about the difference and similarious between the two frameworks: http://jqueryvsmootools.com. I highly recommend JavaScript developers take some time to read Aaron’s post and try the two frameworks for themselves.

Too many to count! I’m most proud of my MooTools plugins: including ScrollSpy, ContextMenu, Dotter, jQuery Events, LazyLoad, and ScrollSide. You can check out all of my MooTools plugins on my website or on the MooTools Forge. I also have quite a few jQuery plugins available on my website. Demos for my plugins are available at http://davidwalsh.name/demos.

One of my college professors once said “Any developer worth his salt will learn one programming language per year” and I generally try to follow that principle. My main languages are PHP/MySQL and HTML/CSS/JavaScript. While Git isn’t a language it sure as hell can be a challenge so that’s what I’m currently focusing on. I hope to dive into Ruby and Python shortly. Unfortunately there never seems to be enough time to learn everything I want to!

Band Website Template came together incredibly smoothly thanks to Chris’ great design and CSS skills. Creating a solid installer was probably the most difficult part of the template for me. BWT does require some webdev knowledge but we wanted to make setup simple for the most non-web-savvy consumers. Once the installer was created the rest was easy. I’m proud of the Gig manager, as simple as it is. I’m also proud of how well it’s been received and lack of support emails we get – we’ve definitely gotten something right!

Chris and I do collaborate quite a bit. Sometimes it’s on big projects like Script & Style and Band Website Template and other times it’s writing parallel blog posts. Often I’ll write the MooTools tutorial that mirrors his jQuery tutorial.
Script & Style was definitely a challenge. I was required to hack some of the default functionality of WordPress’ RSS feeds. We also recently added screenshots of the article’s web page – that required some image caching and screenshot API coding. Despite the challenges, the site has been greatly rewarding and I look forward to developing it further.

Budget. Budget tells you almost everything you need to know about a client. If they will respect the work that you do. If they are going to be high maintenance. If their goals with the website will be in line with your goals for the project. Remember that they aren’t just choosing you…you’re choosing them as well.
An excellent question. It generally depends on the project. Sometimes it’s good to keep only one chef in the kitchen by I usually try to work with a talented band of developers. The more unique, skilled minds you can throw at the problem the better your chances of surpassing expectations.
Oddly enough I only have a few core websites I follow besides Nettuts+. I’m always sure to see what Chris Coyier is kicking around and enjoy reading A List Apart posts. I mostly check out posts coming into Script & Style. I look for inspiration through those posts: ways to improve their code or port it to another JavaScript framework. I also keep my ear to the Twitter street to see what articles people are excited about.

A great developer is someone that is a good problem solver and explores every avenue to achieve a goal. A great developer learns from his past mistakes and does everything possible to avoid repeating them. Lastly, a great web developer is a person that keeps up on all the technologies and spends extra time to understand and experiment with them.

Besides trying to publish more MooTools and jQuery posts on my blog, I do have a few side projects. One project is called OPTMZR which is a website that will offer numerous tools to optimize your JavaScript, CSS, HTML, images, and more. The other project I’ve been working on is a website for my upcoming wedding. I’m going to add some sweet MooTools techniques which I’ll blog about once the site is done.
I’ve been asked to write MooTools books in the past but everything I’ve heard is that it’s a ton of work with very little return. I’d love to see my name in print but I feel my time is best served blogging daily and helping people on IRC. Hopefully one day I can publish The David Walsh Blog book which would feature all of my blog posts over the years.
I really recommend people check out my blog – I have lots of great jQuery and MooTools tutorials, and demos that will give you a better understanding of the two frameworks. Feel free to follow me on Twitter: @davidwalshblog. I also recommend visiting Script & Style – Chris Coyier and I moderate and approve some top notch HTML/Javascript/CSS articles written by industry experts. And don’t forget to visit the MooTools Forge – hundreds of quality MooTools plugins from designers and developers like yourself! MooTools FTW!
Did you know that you can earn up to $600 for writing a PLUS tutorial and/or screencast for us? We’re looking for in depth and well-written tutorials on HTML, CSS, PHP, and JavaScript. If you’re of the ability, please contact Jeffrey at nettuts@tutsplus.com.
Please note that actual compensation will be dependent upon the quality of the final tutorial and screencast.
