No doubt, mobile is huge. With more than 700,000 mobile apps in the Apple App Store and as many in the Google Play Store, mobile computing has demonstrated impressive growth. According to a Gartner survey, 61% of CIOs plan to enhance their mobility capability during the next three years. However, some (particularly small) businesses are still hesitant developing and implementing a mobile strategy. A common concern has to do with the fragmentation of mobile platforms. Even if you focus on the two major systems, iOS and Android, which cover about 85% of smartphones and over 95% of tablets, you still have to master two separate worlds with quite different programming languages (Objective-C and Java), IDEs (Xcode and Eclipse+Android SDK) and APIs; not to mention specific requirements in order to comply with the terms and conditions of the corresponding app store. This leads to little or no code-reuse and, in the worst case scenario, complete recoding for each platform you want to support. With Windows Phone 8 (.NET) as a potential third big player, this doesn’t help ease the situation either.
The process of building a cross-platform app is similar to developing a mobile web app. Other than a native app, a web app typically resides on a web server and is accessed through a browser. Using a wrapper like PhoneGap, the web code is packaged into a native app that can be distributed via the app store. This way you can target multiple platforms with a single code base.
The resulting application is hybrid. It is neither truly native (because all layout rendering is done via web views instead of the platform's native UI framework) nor purely web-based (because it is packaged as app and has access to native device APIs).
Frameworks for Cross-Platform App Development
There are two types of frameworks for building native-like mobile apps:
- Web toolkits facilitate the development of web apps that run in web browsers on various devices.
- Cross-platform frameworks create native apps for a number of mobile platforms.
Here is a selection of frameworks I have evaluated:
jQuery Mobile is an extension of the jQuery framework. The jQuery Mobile library is open source under the MIT License and has support for the vast majority of all modern desktop, smartphone, tablet, and e-reader platforms. Same as Maqetta, it does not create native or hybrid applications unless used with a wrapper like PhoneGap.
Sencha Touch is a performance-optimized HTML5 mobile app framework. It is licensed under free commercial and open source licenses. Sencha Touch has a built-in MVC system and provides native support through a packager which creates apps for iOS, Android and BlackBerry. Alternatively, it can be combined with PhoneGap for deployment to a wider range of platforms and incorporating native plug-ins.
A few other frameworks that we looked at: Motorola RhoMobile, MoSync, Marmalade and Brightcove AppCloud (cross-platform frameworks), The M-Project, Jo, Dojo Mobile and Kendo UI Mobile (web toolkits).
Besides dedicated frameworks for mobile apps, there are mobile extensions for established IDEs, e.g. Oracle ADF Mobile and Appeon Mobile (for PowerBuilder). They allow developers to extend existing enterprise applications to mobile without having to learn a new language or IDE.
Which Framework to Choose?
With the growing number of frameworks and their different levels of maturity there is no simple answer to this question. There are many factors to consider: the mobile platforms you intend to support, the kind of native features your app needs to access, existing development knowledge and experience with IDEs and last, but not least, personal preferences.
But before you start building your app with one of the above frameworks, you should be aware of the limitations of cross-platform development. An un-optimized HTML-based app simply does not perform as well as a native one. Regarding the tools for cross-platform apps, they are still behind their native counterparts.
The pros and cons of hybrid vs. native apps will be discussed in my next blog. To help you decide if cross-platform development is right for you please don’t hesitate to get in touch with me.