Comparing Mobile Web, Hybrid, Cross Platform Native, and Fully NativeApp Development

If you are considering making an app, then there are several options available to you. It basically comes down to how much time and money you want to spend in development for different platforms versus how native you want your app to feel.

1. Web App Development

Web App Development is where you write your app in HTML and JavaScript and it resides only on the web. 

The benefit is that you can write it once, and potentially use it on different mobile platforms as well as desktop platforms.

The drawback is that the user must have an Internet connection to use the app.

There is a meta tag you can put on the app to allow iOS devices to place it as an app on the home screen, but every time you tap the icon, the app does a full refresh, which can be annoying if you are multitasking.  I tried to work around it by using caching, but couldn't get it to work. maybe I just did something wrong though, and maybe there is a good workaround out there somewhere.

2. Hybrid Development

Hybrid Development is where you write your code in HTML and JavaScript and then you display it inside of a native app that uses a web view for rendering.

Generally click events go slower because of a 300 millisecond delay that the browser has in place to detect if you are going to scroll or not. This can apparently be worked around though as seen in QooxDoo's demo. My tests with my own code weren't perfect across both Android and iOS, but there might be a perfect solution out there somewhere.

I found that on my Fascinate that uses Android 2.2, the overflow:scroll CSS didn't work so I couldn't swipe the content around in a div that was otherwise scrollable on my other newer devices. Again, there may be a workaround out there somewhere. I tried the TouchScroll solution on my Fascinate but it didn't work.

The benefit is that you get to reuse most, if not all, of your code across different platforms.

The drawback is that your app will never run at 100% full performance because it is running in a web browser view. Whether or not a that is an issue depends on what your app needs to do.

The Fascinate also did not render a linear gradient in CSS. (Which isn't too bad since you can just use an actual graphic instead if you have to.)

My Galaxy Note 2 did work with overflow:scroll and with linear gradient.

The feeling I get from learning about hybrid development is that while you will save time in being able to re-use code across platforms, you will also spend time trying to make it act native.

For more insights see my my experience with 5 devices.

Some of the development options for hybrid development are:

  • Make a native app with a full screen web view that displays your HTML page that is embedded with the app. This requires at least a Mac computer so you can use Xcode to compile for iOS. Android apps can be compiled using Eclipse on Windows.
  • PhoneGap/Cordova compiled using your own computer or using Adobe's cloud compiler called PhoneGap Build. If you compile using the cloud, you can use either Mac or Windows for development.
  • Sencha Touch
  • HTML5Builder from Embarcadero (which uses PhoneGap)

3. Cross-Platform Native Development

Cross-Platform Native Development is when you use a tool like Xamarin or Titanium to write your code in one language, but for use on different mobile platforms. It then compiles down to native code and supposedly runs as if it were a fully native app.

The benefit is that you get to reuse some of the same code for different platforms and if you don't know Objective-C or Java, then you can use the language you are familiar with: C# for Xamarin, JavaScript for Titanium, and Delphi or C++ for FireMonkey.

Lee Whitney points out reasons why he doesn't recommend Xamarin, but the only two he mentioned that bother me are: supposedly start-up time is slower on Android; and you have more moving parts. Say you get halfway into a project and find out that critical functionality you were hoping for is not supported yet or has a bug? Then you either have to work around it or wait for it to be fixed or supported.

How much code can you re-use?
  • A Xamarin client was able to reuse more than 70% of their code (see TouchDraw testimonial.) The part that is not reusable is the UI portion.
  • The Titanium team has a case study from a client who was able to re-use 70 to 80% of their code across their apps (see imgZine Case Study.)
How much does each platform cost?
  • Xamarin has a free version for personal developers, and not-too-expensive paid versions. (Source: Xamarin Pricing.)
  • Titanium has free or paid versions. (Source: Titanium Pricing)
I guess if your strength is in JavaScript go with Titanium, and if your strength is in C# go with Xamarin.

I wish there was some platform that allowed for 100% code re-use because 20 to 30% of code that you can't re-use still amounts to time and money that has to be spent in development and maintenance for separate platforms.

4. Fully Native Development

Fully Native Development is when you write your code in the language that the platform vendor expected you to write it in. For iOS that would be using Objective-C in the XCode IDE. For Android that would be Google's version of Java. 

The benefit is mainly over Web App and Hybrid App Development in that you get to use all of the native functionality of the device, and your app will run at full-speed.

The drawback is that you don't get to reuse code across platforms.

Xcode for iOS development is free but will ony run on a Mac which generallyncost more than Wndows machines. 

Eclipse for Android development is free and will run on both Windows and Mac.

Comments

Popular posts from this blog

Tic Tac Toe - Using App Inventor Beta

Choosing the Right Mobile Development Framework

Compared: Xamarin vs Xcode - iOS App Size and Startup Speed