In this post, we review the popular frameworks for cross-platform mobile app development.
In this post, we examine the pros and cons of the popular frameworks for cross-platform mobile development. We evaluate some of the popular frameworks you might use for cross-platform mobile app development, helping you find what is best suited for your project.
PhoneGap, Xamarin, Unity, Qt and Appcelerator Titanium are the frameworks that currently account for 80% of all cross-platform development for mobile.
Additional functionality can be written as a plugin and then called from the WebView. PhoneGap provides a cloud-based service (called Build) to compile the application for each platform, avoiding the need to install the software development kit (SDK) for each platform.
PhoneGap can be used to build two types of applications.
Xamarin is the second most popular cross-platform framework. Designed for the enterprise, apps are developed using a single, shared C# codebase. This is then compiled down into true native applications on Android, iOS and Windows Phone.
When using Xamarin, the code for the application is split by the developer into two parts: the ‘core’ and the ‘user interface’.
The ‘core’ part is made up of data storage, business logic code and the rest of the code that isn’t part of the user interface. A developer would write this code once and reuse across all platforms.
With the ‘user interface’ part, the developer would write the underlying code in C# and use native UI design tools to provide a different user interface layer specific to each platform.
Unity is a cross-platform game engine, popular among developers in the creation of mobile games and is one of the best tools for showcasing 3D content.
Using plugins, Unity enables the native libraries to be wrapped into C#, creating a code bridge. By maintaining this wrapper, it opens up access to a wide variety of APIs, allowing communication with native, platform-specific code.
The next cross-platform framework on the list is Qt. With Qt, you write your code once, maintaining one codebase, and deploy across all screens and platforms, without the need for separate implementations on each device.
In Qt Creator, you can build applications for all compatible platforms. With Qt, the backend is developed using C++ and UI is developed on QML, which is a Qt-specific declarative language.
When it comes to platform-specific code, such as UI, the developer adds libraries for each language’s corresponding platform: Java for Android, Objective-C for iOS etc. Next, the library is wrapped in C++, giving the application access to the library API.
There is no perfect solution – as all frameworks have their pros and cons. For very simple apps it is possible to get away with using PhoneGap as long as responsiveness is not a key criteria. For more serious development we recommend using Xamarin and even then, consider combining Xamarin with native development for all user interface elements.