Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Native, Web, or hybrid: How to choose your mobile development path

New tools and frameworks plus the right development kit could boost your mobile apps to multiple platforms

  • Print
  • Feedback

Page 3 of 5

Web-based apps rely on JavaScript for client-side programmability. JavaScript has full-fledged procedural and object-oriented language features; unlike client-side Java Applets, it's supported by virtually all mobile browsers. You can greatly simplify mobile Web app coding by employing an open source JavaScript framework, most of which provide precoded user interface elements and an MVC application model. Examples of open JavaScript frameworks include Ext JS, (now Sencha) JQuery Mobile, and The-M-Project. Using a JavaScript framework is as simple as including the framework's .js file in your JavaScript application and referencing framework functions in your own JavaScript code. Because of this, there is no need to change your IDE, and the learning curve is minimal.

Web-based apps can look and feel very close to native apps, if you discount performance. But because users access the app through their onboard Web browser, a network connection is required for most functions, and users will feel network delays. HTML5 includes the ability to access local storage, but the memory capacity on most mobile devices is usually a few hundred megabytes, which limits what you can do in a Web app sans Internet.

In contrast to native development's need for big-brained programmers, the only skill required for Web apps are those of the average Web developer: HTML5, CSS, and JavaScript, and possibly a server-side language such as Java, PHP, or Ruby. Because the entire app lives on the Web, you can update it at will without having to redistribute the app itself.

Xpous' $9.99 iGenApps offers a code-free approach to building Web apps for both Android and iOS. Aimed at small businesses with simpler app complexity requirements and a limited budget, iGenApps enables businesses to construct Web-based apps right on a mobile device. The app, hosted on Xpous' servers, is distributed via an HTML link in email. Recipients simply click to add the link as a home page icon.

The most powerful refinement to Web app development uses a WebKit browser shell that displays the app's user interface full screen with no navigation or status bars. The WebKit shell is, in fact, a native application, so it typically has access to low-level device features, such as geolocation. Even a minimal WebKit shell, when combined with a Web programming language such as PHP or Ruby on the server side, and HTML5, CSS, and JavaScript on the client, can deliver an impressive simulation of a springy native app with all the usual knobs and dials. But this is just a simulation, which works for basic apps but not those requiring complex graphics or processor-intensive computation.

Adobe's free PhoneGap exemplifies the WebKit strategy, letting you code your app once on the server side, then deliver to multiple mobile OS targets quickly and easily. PhoneGap augments the basic shell with plug-ins that emulate various native interface widgets, giving users even more of a native user experience.

 Mobile app-dev golden path No. 3: Hybrid app development
WebKit paved the way for the third approach to mobile apps: hybrid development. The hybrid model replaces the simple WebKit shell with a more sophisticated, natively coded container, which runs as a native app unique to each target OS. The container vendor maintains the container code, thus incurring the high costs of native code development. That cost, however, is spread among the many customers of a particular hybrid platform, who implement their apps as JavaScript code that is either bundled with the container at installation time or can be downloaded later.


  • Print
  • Feedback