Wednesday, May 11, 2011

Native Mobile App or Web App? Wrong Question!

Mobile app development is hot right now. With smartphone sales approaching one million per day, it's likely that smartphones will outsell PCs this year. While PCs aren't going away anytime soon, it's a safe bet that mobile devices, including smartphones and tablets, will become the dominant application platform in the future. Mobile apps may still be a small slice of software sales in terms of units or revenue but mobile has definitely captured the hearts and minds of consumers, developers, business and the press.

The high level of interest in mobile has sparked a debate among mobile app developers about whether to develop separate native apps for each major mobile platform or one mobile web app that runs everywhere. You'll find empassioned arguments for both types of apps, and more thoughtful analyses like this one by Erik Larsson of Plexical.

I think the question of "web versus native" is a false dichotomy. Web technologies like HTTP, HTML, JavaScript and CSS are well supported by the market-leading mobile platforms. A capable web browser (and corresponding embeddable native web view) are required for a mobile platform to succeed in the marketplace. The killer app for mobile devices is the web; mobile platforms that have second rate web browsing have also lagged behind in the marketplace.

Web technologies are not diametrically opposed to native app technologies—if anything, native apps routinely embrace the web. Few native mobile apps run without connecting to the network to download content, send messages to Twitter and Facebook or to silently send usage statistics to the app's publisher. Web apps by definition are connected to the network and recent work on web standards has been about making web apps useful when disconnected. When considering network connectivity, there's little difference between native and web apps these days. So if network use is basically the same, what separates native apps from web apps? I can think of two things: how they're implemented and how they're distributed.

Different code for different folks
Web apps are built using HTML, CSS, JavaScript and standard web APIs and require no more than a text editor and a browser to get started. Native apps on most platforms are built in a compiled language like Java or Objective-C against proprietary APIs using complex development tools like Xcode or Eclipse. Developing in a dynamic interpreted language like JavaScript is a very different experience from developing in a compiled, strongly-typed language like Objective-C or Java.

Dynamic interpreted languages require writing less code and give the programmer quicker feedback but have drawbacks: dynamically-typed code is less explicit and can be harder for other programmers to follow, especially in larger programs, and subtle errors can go undetected if the code lacks thorough tests.

Strongly-typed compiled languages require more verbose code and the compile step means development is slower and less interactive, but strongly-typed languages have some bonuses: the explicit code is often easier for other programmers to read and understand, especially in larger code bases, and the compiler provides better error checking (but it's still no substitute for good testing).

Both types of development environments have their strengths and weaknesses. This is the "rock versus disco" or "Coke versus Pepsi" debate—there is no right answer. Individual developers prefer one over the other mainly due to individual temperament or because of familiarity and experience. Similarly, organizations will usually follow the path that matches their in-house expertise. There's nothing wrong with building on your strengths.

Free markets and free software
Native apps are for the most part distributed through app stores controlled by large corporations that subject app publishers to various restrictions and requirements. Web apps are distributed by anyone with a few dollars a month to rent space on a server and can be accessed directly by anyone with an internet connection and a web browser.

Some proponents of mobile web apps oppose the app store distribution model on idealistic political or social grounds. App stores and their corporate gate keepers are a potential threat to the open exchange of ideas and free commerce on the Internet. Yet consumers seem to be happy with the safety and ease of use that the app store experience provides, and many developers are attracted to the large and growing market of mobile app store shoppers and are willing to jump through app store hoops to reach them.

You can't argue with an idealist. All I can say is that from a pragmatic view, both the app store model and the open web have their place in the mobile ecosystem right now. As a mobile consumer, I appreciate the app store experience but still use my mobile web browser more than any other app. As a small mobile developer, I think the Apple App Store is the best place to reach mobile app consumers in 2011, but I see the danger in building a product and a business where another company controls access to your customers.

A spectrum of mobile apps
Computer programmers love binary arguments like "native app versus web app" but when you set idealism and personal bias aside, it's not so simple and actually much more interesting. Mobile apps can be built with different degrees of webby and native technology. I'll take a closer look at the space between "pure web" and "pure native" apps next time.

No comments: