David Walsh on how to be a good API and Mobile App Developer
/API Economist: How long have you been developing code, and what was it that got you interested?
David Walsh: That's a good question. I was sitting in my keyboarding class freshman year of high school, and my friend nudged me. He said, "Hey, check out this website.” It was a GeoCities website about Pulp Fiction. I said, "Oh, man. Whose is that?" He replied, "It's mine." I was totally blown away that you didn't need to be this big genius developer to create even a basic web page. That summer I totally nerded out and learned everything I could. I think I was 14 years old then, and I've been in love with web development ever since. I spent a ton of time back then using view source to see how people did things, and 15 years later I'm doing the same thing every day. So that is basically how I got into web development.
API Economist: You have a massive following on your blog with over 30,000 RSS feeds and 15,000 Twitter followers. To what do you attribute that success?
David Walsh: I'm super passionate about what I write regarding web development as a whole, and I think that shows through with my blog. I have also put some effort into search engine optimization, which is also a big part of why people end up coming back. I've also met a lot of people in different parts of web development. I know people who work on the jQuery team, the Dojo team, and the MooTools team. Working for Mozilla allows me to go to conferences, meet a lot of people, and spread the word with other developers.
I like solving problems that I run into. It’s one of the big reasons I started the blog in the first place. When I had these problems I would go search on Google. It would take me forever to find the solution. I wanted to make that process easier because I knew I couldn't be the only person who was running into these problems. I would write about them to make it easier for developers to find the solution so they wouldn't have to go through the hell that I had to go through.
API Economist: You clearly have a focus on front-end technologies like JavaScript, HTML5, and CSS, so design and user experience appear to be important to you. How do you approach that? It's one thing to code. It's another thing to design.
David Walsh: I will be the first person to tell you that I am not a designer. If I have an empty canvas, I'm just going to stare at it for a long time. But if I have something to work with, it's really easy to add little touches to make something better. As far as user experience goes, I'm one of those people that gets annoyed really easily with things that I feel should be implemented. For example, it bugs the hell out of me when a label element on a form doesn't have the pointer cursor because it's something that you're supposed to click. So it's little things like that that really annoy me and drive me to share my ideas about creating a better user experience. I think that's where that attention to detail comes from…being very annoyed with things that should be obvious.
API Economist: Where do you see HTML5 going?
David Walsh: I see HTML5 going where devices are going, which is mobile. We're seeing a lot of features come into JavaScript at the moment to cater to mobile. Within the next five years more people will be browsing the web on mobile. We need more mobile features with HTML5, whether it's device access or basic layout in usability helpers. That's where I would put my money on HTML5 going in the next few years.
API Economist: Where do you see platform providers such as iOS and Android going with support for HTML5?
David Walsh: People want to create their web app using HTML5, CSS, and JavaScript. But you can't actually do that today with Android or iOS natively. You can't submit an HTML5 app even though your web app works great within the device's browser. What developers do is they use a technology called PhoneGap that packages up the HTML5, CSS, and JavaScript application into a native app for iOS, Android, Blackberry, and Windows Phone. This allows you to you create your app once using HTML5, CSS and JavaScript but then use the PhoneGap API to access the native APIs and distribute your app on all of the different platforms. Right now, it's an incredibly useful tool for people looking to create their app with front end technology.
API Economist: What makes a good API?
David Walsh: Within APIs I believe in extensibility. I want to be able to take something that exists and empower it. That's something that MooTools and Dojo have done forever. JavaScript doesn't have native classes but both Dojo and MooTools have created a class API that allows you to extend existing things so you can do more with less code. That's something I strongly believe in. Another thing that I believe in when creating APIs, is to make sure you provide and document methods so that the basic usage of your API is very intuitive. I want the structure of the API to be one where I can almost guess what a method name will be.
Extensibility and intuitive methods are the two things I really believe make a good API. It you have those two things, a community is going to rally around those ideas because your API is just so easy to use. If you have an API that's not easy to use and you need to keep going back to the documentation, even for things that you've already done, that's a really bad API.
API Economist: Open APIs are really taking off. Do you dabble with some of these open APIs?
David Walsh: Whenever I hear about a new API coming out, whether it was Twitter way back when, or the newer stuff, the first thing I do is check it out just to see how it works and see what I can build with it. These companies aren't dumb. They realize that if you create an API, not only are you marketing yourself out there, but you are making people rely on you as well. How many websites out there completely rely on the Twitter API and couldn't exist without it? Google has created these CDNs. Whether you want to believe it or not, these APIs are hooking you into their stuff. APIs are also a great form of marketing. If you open up an API and people create something off of it, more consumers down the road might use your product because they're excited about the site that uses your API.
API Economist: Do you believe the proliferation of open APIs and mobile app development are going to undermine the dominance of traditional web development?
David Walsh: It’s actually happening. Based on pure popularity, we're looking at things going more mobile than desktop in the future. But it really depends on the API usage and its purpose. The whole purpose of building these APIs is to be able to use them and use the information in as many places as possible. I wouldn't say that it would be a bad thing that it would overtake desktop. But I think it's a great extension in allowing us to build flexible apps for any device that we'd like.
API Economist: How has that changed the way you look at your web development? Are you optimizing for mobile environments?
David Walsh: For the longest time, the thought was always desktop first, and then mobile would be nice. It's gotten to the point where mobile is just as important, if not more important than desktop. Mobile devices have changed the landscape of development focus probably for the rest of time.
API Economist: Are you having to learn new skills and approaches, or is this just a natural extension of what you've already been doing?
David Walsh: It's a little of both actually. You have to be able to evolve into a mobile state of mind. Now you have to think about your web app in two orientations, whereas before we just needed the one desktop orientation. But with languages, a lot of apps are moving back to HTML5. We're able to use those skills that we've had all along. We just need to keep the different possibilities in mind when we create the app and when we use that language.
API Economist: As a Mozilla evangelist, what excites you most about where things are going,
David Walsh: It’s definitely Firefox OS. I just want to steer people toward Firefox OS because I think it's absolutely incredible how easy it is to create an app, how easy it is to debug. One of the worst things about iOS for me in the beginning was that you couldn't remotely debug well. But that's baked into Firefox OS from the launch, so it's easy to develop your web app. If there's one thing people should do today, they should take ten minutes out of their day and go the add-on site, download the Firefox OS simulator, install it, and just play around with it because it's incredible. It's so awesome, and I think that Firefox OS is going to be making big waves within the next year or so.
API Economist: You are active in open-source software contribution. What projects are you involved with?
David Walsh: I have been involved with MooTools for about five years now. It was a JavaScript framework that I fell in love with. I've been involved with that for a long time. I worked at a company called SitePen, founded by the founder of the Dojo Toolkit, so I worked with Dojo for a couple of years. Now that I work at Mozilla, I get my hands in anything that I can. The majority of Mozilla's code is open‑source as well. I've been fortunate enough to be able to get my hands into all of these projects. I work so hard on them because I believe in those projects. I see how they help people every day. That's really what drives me to work on open‑source in general. I'm passionate about Firefox OS, and that's what's driven me to ask my manager if I can work more on Firefox OS or go somewhere and speak about it.
It really all just boils down to what you're passionate about, and that passion is intangible. You can't force it, but if you really believe in something, you're going to spend the time to take the extra step to get more involved with it.
API Economist: What are some of your favorite mobile apps?
David Walsh: I use an iPhone and many of the social apps such as Facebook, Twitter, and Foursquare. I used to be obsessed with Words with Friends but now that app bombs out on my iPhone. I am going to call them out for that because it annoys me. I have an iPad and I usually use my iPad just for reading on business trips or playing games. And of course there is Netflix. It’s an amazing app and they do great work on basically anything that you want to use it with. I'll use Netflix on a business trip if I have sufficient Internet connectivity.
API Economist: David, thanks for your time!
David Walsh: It’s been a pleasure!