In theory cross-platform mobile app development sounds tempting: Code sharing, abstracting fragmented ecosystems thus leading to faster and cheaper development plus easier maintenance. Tool vendors advertise shared code percentages close to 100%. The reality however is a little different: Most of the projects will struggle to reach 70%.
This blog post will try to give you an overview of what you can expect and find out which path is the right one for you.
When to develop cross-platform
The decision to develop cross-platform is heavily dependent on the type of your application. If your app happens to have extensive graphics or accesses a lot of the devices functionality like GPS or bluetooth, your code will likely be too low-level to be abstracted. As a result, you will end up with a significant section of platform-specific code. If on the other hand your code is predominantly content-driven or requires only a basic UI, cross-platform development might be a good solution for you. As a rule of thumb, the advantages increase with more complex business logic and a larger number of supported platforms.
Options for cross-platform development
There is quite a range of tools available on the market. Each of them with their own strengths and weaknesses. I will focus on two of the most common frameworks with totally different approaches. The selection of the framework is highly dependent on two factors: the nature of your application and your development team skills.
Apache Cordova, formerly known as PhoneGap, is strongly based on web technologies. When creating a Cordova App, you pretty much build a single page application and wrap it in a native app. The tool ships with Plugin APIs that allow unified access to the device functionality. Naturally, the app does not use native UI controls, but uses web controls to mimicking them.
The presented alternative is Xamarin, a tool based on the open source .NET framework mono. The approach is to write as much code as possible in a portable .NET assembly which can be shared between all platforms. The UI elements can be written platform dependent or using an abstraction framework like Xamarin forms. Note that this abstraction may reduce the features of controls to a common minimum of the platforms.
When to use Cordova
If you have developers skilled in web technologies, Cordova can be an option for you. It is quite easy to maintain a very consistent design throughout all platforms. Note that – due to the lack of native controls – the app might not feel as natural as a Xamarin solution. Further also be warned that creating a good single-page application requires quite a different skillset than creating a classical page-based web application.
When to use Xamarin
If you have developers skilled in .NET technology, you may consider developing in Xamarin. In that case, make sure that you either have platform-specific designs or that the requirements are generic enough to allow for the native controls on all platforms. Not only does customization of native controls increase the effort vastly, but also the result typically feels unnatural in at least one of the platforms. In case you do develop the UI platform-dependent, do not underestimate the demand for platform know-how.
Simply said, the benefits of cross-platform solutions are highly dependent on several factors like infrastructure, know-how and processes. As rule of thumb cross-platform app development is for you if:
- you can accept framework based limitations in areas like UI
- you don’t require access to sensors and specific hardware components
- having your app on multiple operating systems is essential and not just a nice to have
However having said that there are many situations in which cross-platform development might appear an option but can turn out not to be suitable. Just keep in mind.
Regardless of your chosen path consider opening your app’s content to search engines. Thereby ensuring you are not building a new content silo. Learn more about App Indexing.
Never miss an update by following us and subscribing to our monthly newsletter!
Latest posts by Markus Klimmasch (see all)
- What to consider when specifying the search function of your website - March 7, 2016
- Considerations for X-Platform Mobile App Development - November 20, 2015
- Sitecore Experience Database vs Google Analytics - November 11, 2015