The Myth of Multi-Platform Mobile Development

lug 5, 2012 by     3 Comments    Posted under: Mobile Solutions

If you’re a seasoned developer, the idea of cross-platform development has probably crossed your mind a few times already and well before the advent of mobile development.  Java was welcomed and then abandoned as the language to write code once and run everywhere.  At some point in the 1990′s, CASE tools became popular for letting you build the same app for multiple platforms.  Frankly, web services and websites are the best attempt we ever made for building code that could be hosted on a variety of platforms.

The key point is: using a single framework to build applications for different platforms, only works if you are willing to accept certain compromises. Given the fragmentation in mobile at the hardware level, you can’t reasonably expect to pick a framework, write the same application once, and have it behave smoothly and as fast as a native application; on each platform and with a compelling device-specific user interface.  In a way, it’s like the old game of picking two options out of three.  Great user experience, excellent performance, and lots of programming goodies are available to you—but you’re only allowed to pick two.

Yet, developing mobile applications is neither cheap nor quick.  It is commonly believed that outsourcing is preferable to in-house development, mainly because in-house development means that: first, you need to invest in training.  It’s one thing to train a team of developers on ASP.NET and then have them build three sites in a row.  It is quite another to train a team on three different mobile platforms and then have them build the same application three times from scratch—once for each relevant platform you plan to address.  Outsource it.  Whether you’re the software company or the buyer, how would you approach the development of applications for multiple mobile platforms?

Overall, there are two main approaches for cross-platform development:

• The Virtual Machine pattern is about writing the application using an abstraction layer that a platform-specific virtual machine will translate in the best possible way to the mechanics of the underlying platform.

• The Shell pattern is about hosting a web application in a shell of native code.  In this regard, the use of HTML5 and its advanced capabilities (e.g., input forms, local storage, and offline behavior) is a winning factor.

Frameworks based on the Virtual Machine pattern, expose an abstracted API that is not specific to the target system, such as iOS or Android.  Such an API, does expose concepts that map directly to native iOS (or Android) features.  However, developers are not required to acquire and use any specific knowledge about the platform, at the API level.  Titanium Mobile and Flash Builder are two frameworks for iOS and Android development, allowing you to use JavaScript and ActionScript to build apps—no Objective C, Java or CocoaTouch skills are required.

As nearly every mobile API offers a component to view HTML, the idea behind the Shell approach is to integrate a web-view native component with the user interface of the application.  The HTML to display in the web-view is usually bundled with the application but it may be downloaded from a remote site.  PhoneGap is the most illustrious example of a framework that promotes the Shell pattern.  In this case, the shell of native code has a fairly simple structure: it is a native window with a single web view. The web view displays a set of HTML pages (and associated files) embedded as resources in the application’s bundle.

In mobile, there are no silver bullets.  Multi-platform development is often a business necessity and must be addressed.  The solution comes in the context of a strategy rather than picking up some magical technologies. PhoneGap, Titanium and other frameworks are just some options to be evaluated in order to build the solution that works for you.

Dino Esposito

CTO of a company that provides software and mobile services to professional sports, Dino is a well-known ASP.NET expert who has written several popular books, including Microsoft .NET: Architecting Applications for the Enterprise, Programming Microsoft ASP.NET, and Programming ASP.NET MVC, all for Microsoft Press. His latest book, Architecting Mobile Solutions for the Enterprise has just been published by Microsoft Press and is available for sales.

More Posts

Follow Me:

3 Comments + Add Comment

  • It s actually a great and useful piece of info. I am glad that you simply shared this helpful information with us. Please stay us up to date like this. Thank you for sharing.

  • It s actually a great and useful piece of info. I am glad that you simply shared this helpful information with us. Please stay us up to date like this. Thank you for sharing.

  • I enjoy what you guys are usually up too. This type of clever work and reporting! Keep up the fantastic works guys I’ve added you guys to blogroll.

Got anything to say? Go ahead and leave a comment!