Frameworks For Cross-Platform Mobile Development

Oct 23rd 2012, 15:55 | 15 comments

As a company that develops iOS, Android, and Windows Phone applications, we are often asked to develop an application for two or three platforms. When this happens, some suggest using one of the frameworks for cross-platform mobile development. They believe it’s better than redeveloping the same functionality for each mobile platform. But are they right? Let’s find out.

The idea of cross-platform mobile development is really great and easy to market:

With so many advantages, why then are there far more native apps compared to cross-platform ones? To answer that, let’s review how these frameworks really function.

First, we’ll have to choose several frameworks; not a simple task. According to Wikipedia, there are 20+ frameworks for cross-platform mobile development. For our purposes, we chose only the most popular: PhoneGap, Appcelerator Titanium, Marmalade (formerly Airplay SDK), MoSync, and Sencha.

Web Based Solutions

PhoneGap-Sencha

Mobile platforms let developers use a web browser control (let’s call it webview). PhoneGap and Sencha packages web applications into native applications that use this webview control to render HTML pages as UI. HTML / CSS / JavaScript allows you to do this on webview as if it were a normal web page. For example, Sencha Touch draws web elements by using CSS and JavaScript as if they were native UI elements. So you get a mobile version of the website.

PhoneGap also lets JavaScript SDK access native device capabilities like GPS, camera, Accelerometer, microphone, contacts, etc.

Appcelerator Titanium

Appcelerator Titanium

Titanium lets developers create native applications by writing JavaScript and using Titanium’s APIs. The resultant apps perform as if they were written with native SDKs. To achieve this, the application source code (Javascript) is interpreted at runtime and mapped to a native code to generate native UI components. The application’s UI then becomes completely native.

Compared to PhoneGap, there is no webview since the native Titanium APIs take control of all the UI needs. The obvious benefit here is performance. Native application elements will perform faster than when using HTML, CSS, and JavaScript in a browser instance.

Titanium also provides a platform-independent API to access native UI components. This includes navigation bars, menus, dialog boxes and alerts, as well as native device functionality, including the geolocation, accelerometer, file system, sound, local database, etc.

Marmalade (formerly Airplay SDK)

Marmalade

Marmalade is a cross-platform SDK for the development of smartphone, tablet and Smart TV apps. It supports two separate development approaches:

Access to native functionality is either provided already, or can be added using the extensions. The Marmalade Extensions Development Kit (EDK) allows developers to design their own extension APIs, then implement them on whatever OS platforms they choose, using each platform’s native SDK.

Marmalade also provides several options for User Interface:

MoSync

MoSync

MoSync enables mobile developers to build and compile apps for up to eight different platforms, using C/C++ or HTML5/JavaScript, or a combination of both, to create apps of different types, including:

Perhaps the most interesting function is the building hybrid apps using HTML5 / JavaScript / CSS for UI and C/C++ to access device functionality not available in HTML5. So you can write the application logic in JavaScript or in C/C++ and use HTML and CSS for the user interface of the application.

Native SDKs

Native

Developing Android and iOS requires getting the respective SDKs. On iOS, this means learning Objective-C and Cocoa Touch. Android programming is similar to Java, but with Android-specific APIs and frameworks.

On the one hand, developing native apps gives you the most power over the platform, while spending less time having to learn intermediate libraries and tools (which could have bugs). But on the other, you need more native experts and time to develop each platform.

Should you choose the latter, you should probably deliver on one platform first to capture requirements, and to incorporate feedback on only one platform. This removes the need for duplicated (or more) efforts in the early stages of development.

iOS can be used as a lead platform, since statistics show that:

Android can also be used as a lead platform because the time to market is shorter, with no review phase when releasing to Google Play. Further, you get a more open platform which lets you cut corners during development. However it may require more time due to a big fragmentation of Android devices on the market.

When choosing a lead platform, your decision should be based on the strategic perspectives of each, your own strengths and the type of app you want to deliver, as well as the experience of the accessible developers. Fortunately, there is an abundance of information on the pros and cons of each.

Summary

No single app is trouble-free. Each has unique requirements and use of different tools, depending on the job needed. We can't really say that mobile frameworks have no future, some would say that one of them may eventually become bigger and even more popular than standard SDKs. Although most of them seems pretty raw at the moment, we do think they can be used for development of simple apps.

Our company still leans towards native SDKs as a more secure and predictable way of development. We decided to give cross-platform frameworks more time to get mature and get rid of early stage issues and bugs. It would also be interesting to know how other IT companies solve a question of developing a mobile app for multiple platforms.

P.S. Mark Zuckerberg, Facebook’s founder said that the “biggest mistake we made as a company was betting too much on HTML5 as opposed to native.” You can read that article by Christina Warren here. In it, Zuckerberg admitted that using HTML5 led to inferior performance, and that it took ten to twelve months before realizing they should have built it to run natively on systems like Apple iOS and Android.

Links

http://developer.appcelerator.com/blog/2012/05/comparing-titanium-and-phonegap.html
http://webinos.org/crossplatformtools/marmalade/
http://webinos.org/crossplatformtools/mosync/
http://stackoverflow.com/a/7579647
http://www.mosync.com/documentation/manualpages/creating-user-interfaces-mosync
http://www.straightforward.se/storyserver/html5-javascript-mobile-apps-road-ahead
https://www.facebook.com/notes/facebook-engineering/under-the-hood-rebuilding-facebook-for-ios/10151036091753920

Comments

no image
Martin J Potter | Nov 5th 2012, 19:24
I actually wanted to develop a remark to be able to express gratitude to you for these awesome points you are writing on this site. My considerable internet look up has finally been paid with brilliant information to write about with my company. I would express that many of us website visitors are definitely lucky to be in a useful place with many special individuals with beneficial secrets. I feel rather happy to have come across the webpage and look forward to plenty of more exciting moments reading here. Thanks again for all the details.
loading... | Nov 6th 2012, 12:37
Hi Martin,

Thanks for taking time reading this article and filling the void in comments. I am glad you found it useful. We'll try to continue sharing our experience in this field.
no image
Sravan | Dec 28th 2012, 18:54
I just learned about webview looking to see if there is a way to develop one server side application that could serve html and javascript to different client devices. I hit a jackpot by landing on our page. Great Information. I am a windows guy and want to use Windows 8 as my lead platform to develop my first app. Thanks for all the information.
loading... | Dec 29th 2012, 16:38
You are welcome, Sravan.
If you are going to develop a server side app - don't forget to think what to show to users without coverage.
no image
Pharmg325 | Feb 3rd 2013, 08:47
Very nice site!
no image
Kelly | Feb 22nd 2013, 00:54
Thank you for this. This is one of the most thoughtful and insightful comparisons of SDKs that I have found. It was exactly what I needed.
loading... | Mar 2nd 2013, 21:17
You are welcome, Kelly. Your comments was one of the nicest on our site. So 1:1 :)
no image
scrapebox proxy | Mar 4th 2013, 13:11
wonderful issues altogether, you simply gained a emblem new reader. What would you suggest about your publish that you just made a few days ago? Any positive?
loading... | Mar 7th 2013, 13:43
Not having mobile programming skills in Objective C, Java, Javascript, or other languages no longer has to be a roadblock to developing mobile apps. All developers can now build, test and deliver data rich, native apps quickly and easily without any mobile programming skills required.
no image
Ilya | Mar 25th 2013, 16:12
What about appmobi.com?
loading... | Apr 3rd 2013, 11:55
What about it? :)
loading... | Apr 24th 2013, 16:15
no image
Jarkko Saltiola | Jun 7th 2013, 07:45
Thank's for the article. There was good information about a couple frameworks that were new to me.

I recommend the PropertyCross project to anyone looking for more information about cross platform mobile client libraries and frameworks. They have compared a bunch of them by making the same sample app with each.

http://propertycross.com/


no image
Zafar | Sep 17th 2013, 09:45
very well done Kostya!!!...i am glad to see such a comprehensive info about cross-platform SDKs. Thanks alot!
loading... | Sep 18th 2013, 04:44
I am glad you guys liked it!
Add Your Comment

 

=