There are, however, several big classes of applications that don't work well as HTML apps. In addition, parts of the smartphone hardware such as the camera are hard to access, and at times, the access is completely blocked. Game programmers will notice immediately that the response time is slower, often dramatically so. Even publishers looking to package a book as an app will find that some behavior can be sluggish for content that's supposed to flip and zip around like game sprites.
Still, many applications can be written in HTML successfully, such as sites that display information from databases. For example, apps such as those from Facebook and Yelp format data for easier viewing, which doesn't require zippy sprites or instantaneous responses. Although many of the top-selling apps are games such as Angry Birds, many of them -- including apps for the Weather Channel, Netflix, and books -- are easy to deliver in pure HTML.
Here are the four paths to bringing an HTML Web app to smartphones everywhere. No matter what you choose, though, you'll also have to think about how to deliver the app to your users, as I later explain.
Path 1: Open source libraries for websites
Some of the first people to understand the effectiveness of the HTML model were open source programmers who demonstrated the power of the mobile browsers by quickly mocking up the right CSS files to make the HTML look just like the stock applications from Apple. With the right CSS, a list of data marked up with
<li> tags would look like an Objective-C ListView built with several files of basic Objective-C. Good instances of this approach include iUi, jQTouch, jQueryMobile, and iWebKit.
Working with these libraries is easy if all you want to display are basic lists and blocks of information on your phone, such as lists that slide back and forth. Each package comes with several styles, and you can always tweak the user interfaces by adjusting the CSS files.
If the foundations matter, both jQueryMobile and jQTouch are integrated with jQuery, which makes it a bit easier to work with many of the other jQuery plug-ins. iWebKit and iUi stand alone and rely more on CSS.
All four libraries, given their open source nature, are closer to hobbies than full-on development toolkits, even though they're polished enough to be used on many basic commercial projects. iUi, for example, hasn't seen a new bundle of code since version 0.40 in December 2009. iWebKit rolled from version 5.0.3 to 5.0.4 in March 2010 and has been quiet since. At the moment, jQueryMobile seems to have the most momentum. jQTouch receives plenty of attention, with recently added themes and maintenance work to improve the sensitivity of touch events.
The bottom line is that these open source libraries are just beginnings, not fully formed packages. If you're building a sophisticated app, you'll need to be ready to do some hacking yourself.
Path 2: Mobile repackagers
There are a surprisingly large number of websites that repackage information for mobile platforms. Some are thin veneers that scrape the data off of your main website, and others offer more sophisticated tools for editing the content, but all are effectively a well-tuned collection of templates that repackage the information in a way that's easier to read on a phone.