Escape the App Store: 4 ways to create smartphone Web apps

Proprietary, incompatible coding systems and app store controls can make mobile app dev too hard -- so try these HTML-oriented alternatives

So you want to get your software in the hands of the hundreds of millions of smartphone users around the world. Perhaps your boss said "mobile" is the new buzzword. Perhaps you're worried that some are saying the PC's time in the sun will be over soon.

It doesn't matter why you want to develop mobile apps. The problem is that following through is still pretty tricky. The iPhone and iPad want code written in Objective-C, and that language remains a bit obscure. Plus, once you're done coding, there's a distinct possibility that Apple will slam the door to the App Store right in your face for some unknowable reason.

[ Get your websites up to speed with HTML5 today using the techniques in InfoWorld's HTML5 Deep Dive PDF how-to report. ]

The Android smartphones speak the more popular Java, and there's no controlled app store to hinder distribution, but they're still a distant second, at least in the world's mind share. BlackBerrys speak Java, but they use an entirely different Java API, so you need new routines for them. And Microsoft recently introduced Windows Phone 7, which uses Silverlight and .Net.

To make matters worse, smartphones don't have much memory, and they're constantly shutting down services to save battery life. Coding for them often involves tricks not often used in desktop apps.

The end result is that mobile app development is a pain -- but there's another path than using each mobile platform's specific language and development tools: HTML applications that run in smartphones' Web browsers. The iPhone and the Android smartphones both come with browsers based on the open source WebKit project, as do Nokia's Symbian and Palm's WebOS. BlackBerry OS 6, found in the Torch model, also uses a WebKit-based browser. Thus, a website designed for any of these devices will look and behave pretty similarly on the others. (The exceptions: Windows Phone 7 and older BlackBerry OS versions, whose browers are based on more limited, proprietary technologies.)

Creating an HTML Web app tuned for smartphones instead of creating a full, native app has several advantages:

  • It is naturally cross-platform.
  • Although the small screen is a challenge for designers, it is usually possible to borrow code from desktop websites.
  • There are many more HTML and JavaScript programmers than there are Objective-C or Silverlight experts.
  • Updates happen on your schedule, not an app store's, and there are no arbitrary rules that might keep your Web page from reaching its audience.
  • It's often relatively easy to recode the presentation layer of your website to produce the optimized HTML code for the mobile platforms. In some cases, it just takes a new CSS file.

The HTML code can arrive at the smartphone through two paths. The simplest is to store it at a Web server that detects the browser and delivers a special smartphone version to any visitor. In that path, it's a website and an app at the same time, a move encouraged by the operating systems.

But there also are ways to bundle the HTML code into a stand-alone app that resides on the mobile device by wrapping a thin layer of native code around it. Whichever path you choose, the logic and artwork are the same. (And with portions of the draft HTML5 specification finding their way into mobile browsers, your HTML-based mobile apps can act more like traditional apps, such as by taking advantage of HTML5's offline storage and canvas capabilities.)

1 2 3 4 5 Page
Mobile Security Insider: iOS vs. Android vs. BlackBerry vs. Windows Phone
Recommended
Join the discussion
Be the first to comment on this article. Our Commenting Policies