Mobile programming: Native vs. HTML 5 vs. Titanium

Which platform to choose? The advantages and disadvantages when considering all aspects of development.

But what are the aspects to consider? These are the ease of development, reusability of code, abilities and limitations of the platform, and therefore the quality of the application, its fluidity, its appearance.
But we must also consider the benefits to the application once finished: compatibility with operating systems, access to shops, the future of devices supported.

Depending on these factors, we can determine in which scope each platform will offer the best support. If one knows a little these technologies, one can guess already the trend, but it's nice to know exactly what you can expect from each.

HTML 5

Works on all devices and systems provided that JavaScript is not disabled.


Description

HTML 5 is a language of description of user interface. The association with data is made in JavaScript with a data server, such as Node.js. This allows it to interface with native APIs that manage functions of the device. One of the most used is PhoneGap. The design is also facilitated with frameworks such as Backbone and Sencha.

Easiness

Coding in HTML 5 can be very difficult. We must work with a dynamic language, manage the offline mode, tweak the sound if necessary and especially test the application on multiple browsers. For a business application it may be easier thanks to the many frameworks that support the association of data with the interface.

Durability

If it is based on standards, such API developed by Mozilla for mobile application, it will be here to stay indefinitely (on the horizon of computers).

Features

Thanks to the Canvas tag that provides a drawing surface or animation, all graphical applications are possible. The sound is also available but not very effective. WebGL offers 3D but it is an emerging technology. APIs provide access to the equipment, with a lower reactivity than native applications.

Compatibility

The application works on all operating systems and types of computers or mobile. It will also work on Windows 8 Metro.
The same code can be reused on a website, a local application, a mobile application.

Distribution

HTML 5 applications have potential access to the AppStore, and Facebook for mobile. It has the advantage of supporting all the systems which affects a broader echo in the media.

Scope

The application should depend little upon mobile specific functions, such as sensors. This is the case of games, but so far it's not the best platform for them. The sound is poor for now. Actually, there is a lot of games on Canvas.
Practical applications or Internet-related or which get data from a database are the easiest to achieve.

Native

Each operating system has a native programming platform. Tizen and webOS use HTML 5 and a low-level framework to access device functions.


Description

Language and programming tools are system dependent. iOS uses Cocoa and the Objective C language, for Android it is the Dalvik virtual machine and Java. Dalvik is ported on other systems, with a rather average user experience.

Easiness

The platform is in second place in terms of difficulty. It has generally interface development based on Eclipse with emulators on the desktop. There is an application generator for Android. When you program regularly natively, it seems simpler than HTML, but the opposite is true for a first application.

Durability

New versions of the OS or different devices may make the application obsolete. It will therefore need to be updated regularly.

Features

Speed, fluidity, access to native graphics components and other system components.

Compatibility

Regarding Android, fragmentation is important. An application for Android 4 will not work on 2.3. Developers tend to limit the application to find the common denominator. For each OS, you must rewrite the application to port it to another.

Distribution

An iOS application can enter the Apple AppStore. It is not guaranteed. Once the entry fee paid, the application may be refused. And if accepted, you have to leave 30% of revenues to the firm. In return, the application will have a wider exposure and wider sales on devices of the manufacturer.

Scope

One can access all the possibilities of the device, and more even to the many devices that were invented to extend the mobile. Natively, all types of applications can be made.

Titanium

Can generate native code for each systems from the same source code. Appcelerator, the publisher, offers Titanium Studio for free with the SDK but without extensions for business. The publisher claims 300,000 developers are using the platform in 2012.
You should know that if the tool is free when building software itself free, it has a high cost since it is used for a commercial product. So, read the license carefully before using. Only the version on GitHub with the SDK you compile yourself is free.


Description

Combine an IDE based on Eclipse, Titanium Studio, an SDK and JavaScript that can interface with native APIs.

Easiness

To the extent the same code is used for all systems, it is the easiest to use ... According to the publisher, we program faster than with Objective C or Java. In fact it is surprising to see that less lines of code are required for the same result.
Uploading the app on app stores is automatic.

Durability

The future of the platform is linked to that of the publisher. If it withdraws trade, there will be no more updates. But the code is open source, and he could always find a buyer.

Features

Adds cloud services to applications with notifications, and a statistical service to know how is used the application.

Compatibility

Compatible with all phones, tablets, and desktops.

Distribution

Applications are accepted on the AppStore since a policy change from Apple.

Scope

As native applications, they have access to device functions, but the platform is generic and therefore not being close to any system, it will be less suitable. What it supports is the common denominator of all the OSs. It is therefore suitable for a mobile application especially but not to a particular device.

Conclusion

There is often confusion between Web application and HTML 5 application. The JavaScript section of this site, however, shows that one can build local HTML 5 applications with Node.js. Apparently on mobiles, this platform is linked to Internet and thus requires a load time for the application. This disadvantage no longer exists if you know how to manage the offline mode.

The other disadvantage of HTML 5 is the difficulty of programming, while Titanium also using JavaScript would be easier than native development. The latter is the choice to make if we need use all the resources of the device and better performance. It requires more or less to be belonged completely to an operating system.

Second part: Choices made by some actors and their experience.