13 essential programming tools for the mobile Web

HTML5 and a vibrant ecosystem of libraries are making the mobile Web a compelling alternative to developing native code

1 2 Page 2
Page 2 of 2

Mobile Web programing tool: Jo and Sencha Touch
Download Jo
Download Sensa Touch

Jo and Sencha are two collections of widgets that create card-oriented mobile applications in JavaScript. The structure is defined by a collection of JavaScript functions that create the widgets that are arranged by the libraries to look good on the screen. The code for these often includes big, nested function calls that assemble the parts and then call other functions that assemble these parts into bigger parts.

Sencha Touch is built by a burgeoning company, Sencha, that also offers a framework for regular Web pages. It sells a collection of support plans but does not charge for a commercial license to use Sencha Touch. The company's development team answers questions for users and maintains an open support forum.

Jo is an open source project delivered with the OpenBSD license. It is free to use, and Dave Balmer, Jo's developer, runs support for those who need help.

I've built several Web applications with Sencha Touch and have found the process relatively easy because the framework handles many of the layout questions. In the best cases, I simply created a new widget object, and the Touch framework would squeeze it into to the page so that it looked nice. Some of the resulting apps worked well on both the iPad and the iPhone despite the different screen sizes.

Both Jo and Sencha Touch are producing more code than documentation right now. Each should be filling these gaps soon, but for the time being, Sencha's commercial support offers the deeper documentation of the two.

Mobile Web programing tool: jQTouch
Download jQTouch
jQTouch was one of the first great frameworks for mobile Web applications. Its creator, David Kaneda, has since left the project to work for Sencha, but Jonathan Stark has taken the mantle and continues to add worthwhile tweaks to the code.

Applications in jQTouch are built by inserting HTML in DIVs. jQTouch parses these DIVs looking for the right classes, then inserts its own code for handling events.

I've built several Web applications on top of jQTouch and found it's as simple as creating a Web page. It's also a bit easier to integrate with dynamic Web tools like JSPs, PHP, and other server-based frameworks.

In the right situations, the code looks identical to native apps. But sometimes I've found odd glitches and weird transformations that don't make sense. Some of the touch events are also a bit slow on certain platforms.

Mobile Web programing tool: PhoneGap
Download PhoneGap
Another of the biggest and most successful open source mobile frameworks is PhoneGap, a very simple collection of routines that allows you to build native apps for smartphones by writing HTML, JavaScript, and CSS. Many of the JavaScript frameworks described in this roundup are meant to be bundled with PhoneGap before being sent to the App Store.

The concept is simple: The framework opens up a view that parses HTML. On iOS, this is called UIWebView, but there are similar components in all of the major smartphone development stacks. The goal is to arrange for the same HTML, JavaScript, and CSS to work on all of the major platforms, like Android, iOS, BlackBerry, and WebOS.

I've built several applications and found that PhoneGap's approach usually comes fairly close to working. It has taken me as little as an hour to transform a Web app into a native app for iPhone and Android. PhoneGap did all of the work of popping up a window that acts like a Web browser.

The idea isn't perfect. I've found many little differences in how Android and the iPhone display the same HTML and CSS, despite the fact that Android and iOS supposedly use the same WebKit core. While I haven't built any full BlackBerry or WebOS tools lately, I wouldn't be surprised if there were many other little problems. Either way, PhoneGap can take your Web application from relatively simple to relatively universal, relatively fast.

Related articles

This article, "13 essential programming tools for the mobile Web," originally appeared at InfoWorld.com. Follow the latest news in programming and mobile technology at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.

Copyright © 2011 IDG Communications, Inc.

1 2 Page 2
Page 2 of 2
How to choose a low-code development platform