Cross Platform Mobile Development

2 minute read

This post documents the different technologies investigated for cross-platform mobile development.

Background

This post documents the findings related to each technology investigated for cross-platform mobile development. As more features are investigated, this post will be updated in consequence.

Comparison Matrix

Features Xamarin Apache Cordova Winner
IDE Visual Studio Community Edition
Xamarin Platform
Some serious work was made to integrate Xamarin in Visual Studio. Very streamline.
Visual Studio Community Edition
Tools for Apache Cordova
I found the integration a bit buggy. For instance, I had to delete the generated file and rebuilt the app to avoid errors.
Xamarin
Language XAML and C#
This comes down to preference. I’m a .NET developer so I’m more incline to XAML and C#
HTML and JavaScript
Web developer would find themselves at home.
Tie
Pricing 1 year trial and 25$ per month
1000$ per year for Visual Studio Integration
Xamarin now provides a free version for students, oss development and small non-enterprise teams.
Free Tie
Shared UI Xamarin.Forms
Paid solution available such as Telerik and ComponentOne. Components are translated to native UI element so they work for sure.
HTML Elements
Third party libraries like Onsen and Ionic
This is where HTML really shine. The web is filled with communities providing UI element for free. However, cares must be taken with choosing elements since they may not work with all browsers.
Apache Cordova
Shared Business Logic C#
Shared Project
Portable Class LibrariesXamarin’s magic make sure the code run on any platforms.
JavaScript
Just like any JavaScript file running on any browser.
Tie
Libraries Xamarin Components Store
More might be found on NuGet but you need to make sure it works on the platform of your choice.
Choice is limited.
Since it is classic JavaScript, packages found on Bower are working so far.
Choice are immense. But often browser dependent.
Apache Cordova
Emulation Visual Studio Emulators
Emulators for Windows and Android worked right off the box.
Visual Studio Emulators
Emulators for Windows worked right off the box. For Android, I haven’t been able to make it work.
Xamarin
Community Dedicated Forums
When a question is asked there, you know the answer is in the context of Xamarin.
StackOverflow
Support is trickier. Often posts would refer to vanilla Android development and you would need to ‘translate’ it to Apache Cordova’s context
Xamarin
Native Features Access via Dependency Service
Xamarin has done an amazing job wrapping native feature such that creating custom plugins is done in C#.
Access via Plugins
Apache Cordova Plugins
Creating your own plugins in Cordova is more challenging. It must be done in Java for Android, and JavaScript for Windows Phone 8.
Xamarin
UI Styling Styling in Xamarin.Forms is similiar to XAML Styling
Xamarin.Forms renders elements using native element. If you want to change the look and feel, you will need Custom Renderer
Since Xamarin translate to native UI, the styling is often correct. Otherwise, customer renderer can help.
Classic CSS Style Sheets
Make sure your CSS is supported equally among all browsers, which could be quite challenging. Remember the days of making sure it works with IE, Netscape, Firefox, Chrome? It’s the same thing.
Xamarin
Updates Notice via the system tray Notice via Visual Studio’s notification Tie

Decision Tree

.NET developer should be favouring Xamarin over Apache Cordova whereas JavaScript developer should be doing the opposite. The only time I used Apache Cordova over Xamarin was when a third party provider started to include HTML construct in the response of its web service. Needless to say that it’s not a good practice. However, if the amount of HTML is fairly limited, you can still use Xamarin by integrating a WebView component.

Leave a Comment

Your email address will not be published. Required fields are marked *

Loading...