Jump to content

How to Decide Whether to Use Native or Web App Development for the Android

+ 1
  chco's Photo
Posted Dec 01 2010 10:53 AM

The following excerpt from Building Android Apps with HTML, CSS, and Javascript outlines the pros and cons of the two approaches you can choose from when building an application for an Android phone.
Different applications have different requirements. Some apps are a better fit with web technologies than others. Knowing the pros and cons of each approach will help you make a better decision about which path is appropriate for your situation.

Here are the pros of native app development:

  • Millions of registered credit card owners are one click away
  • You can access all the cool hardware features of the device


Here are the cons of native app development:

  • You have to pay to become an Android developer
  • Your app will run only on Android phones
  • You have to develop using Java
  • The development cycle is slow (develop, compile, deploy, repeat)


Here are the pros of web app development:

  • Web developers can use their current authoring tools
  • You can use your current web design and development skills
  • Your app will run on any device that has a web browser
  • You can fix bugs in real time
  • The development cycle is fast


Here are the cons of web app development:

  • You cannot access the all cool hardware features of the phone
  • You have to roll your own payment system if you want to charge for the app
  • It can be difficult to achieve sophisticated UI effects


Which Approach Is Right for You?

Here’s where it gets exciting. The always-online nature of the Android phone creates an environment in which the lines between a web app and a native app get blurry. There are even some little-known features of the Android web browser that allow you to take a web app offline if you want. What’s more, several third-party projects—of which PhoneGap is the most notable—are actively developing solutions that allow web developers to take a web app and package it as a native app for Android and other mobile platforms.

For me, this is the perfect blend. I can write in my native language, release a product as a pure web app (for Android and any other devices that have a modern browser), and use the same code base to create an enhanced native version that can access the device hardware and potentially be sold in the Android Market. This is a great way to create a “fremium” model for your app—allow free access to the web app and charge for the more feature-rich native version.
Cover of Building Android Apps with HTML, CSS, and Javascript
Learn more about this topic from Building Android Apps with HTML, CSS, and Javascript. 

If you know HTML, CSS, and Javascript, you already have the tools you need to develop Android applications. This hands-on book shows you how to use these open source web standards to design and build apps that can be adapted for any Android device -- without having to use Java. You'll learn how to create an Android-friendly web app on the platform of your choice, and then convert it to a native Android app with the free PhoneGap framework. Discover why device-agnostic mobile apps are the wave of the future, and start building apps that offer greater flexibility and a broader reach.

Learn More Read Now on Safari


Tags:
1 Subscribe


1 Reply

0
  Robin Nixon's Photo
Posted Dec 05 2010 02:29 AM

This is an excellent analysis and you are absolutly correct - if you write a web app with Android (and iOS) specs in mind and keep it self-contained, you can drop it into a simple Java (or Objective C) wrapper using a WebView, and you don't need to use any third party software to turn it into an app that you can sell via the standard app stores. Make sure you use tel: and sms: links and you can also access the phone and messaging capabilities of the device, if it has them.

Using HTML5 and CSS3 your app written in Javascript can look every bit as good as a native app (although some Android devices are currently far slower at CSS3 effects such as transitions than iOS).

I have used these techniques to write web apps that can be dropped in as-is to simple wrappers I created for both Android and iOS, without any modification (for example, search for "eML" in the iTunes Apps store, or Android marketplace to see one of the eBooks I published).

I see this as the technology that will be used for the next big wave of apps, from developers who aren't ready or don't have time to learn both Java and Objective C - particularly when it should also be possible to similarly embed such web apps into Windows Phone 7 and RIM devices (I'm currently researching this).