apache-cordova – When to use Cordova or Xamarin?

Question:

When researching a little about platforms for developing mobile apps, I came across Xamarin and Cordova.

Both aim to develop a single code base for applications running on Android, iOS and Windows Phone.

As I'm not an expert in mobile development, the following questions came up:

  • What are the main differences between these platforms?
  • Is it possible to use native features that are unique to a certain operating system?
  • Are the platforms compatible with each other?

Answer:

Xamarim is for creating mobile native applications (Android, Windows Phone and iOS) using Microsoft's C# language.

Cordova (or as it used to be called: PhoneGap) is the same but using Javascript

Both work as a proxy when calling internal functions whatever the mobile device, they internally call the right method, whether they are running on Android, WPhone or iOS, where we programmers just call one method.

Not wanting to get into the debate, which is the best language, if C# or JavaScript, it will be with the programmer himself, how he wants it and for what purposes his application will be.

Xamarim, you need a license is free since April 2016 (since Microsoft acquired Xamarin ), and has its own IDE ( Xamarim Studio and Visual Studio), Cordova is free.

Xamarim integrates into the code compilation so you can do whatever application is including native games, while Cordova runs on a web panel, ie the application will always be a web page where you can then run the JavaScript commands and "draw" in HTML5 and CSS3, that is, everything you can do on the web, you can run with Cordova.


What are the main differences between these platforms?

Xamarin 's main goal is to bring .NET programmers to iOS, as the language is C#. They are known for, whenever Apple exposes new API's, in less than 24 hours they are available in Xamarim. With Xamarim, we can create any native application, and now as it supports Android and Windows Phone as well, we can have our own application libraries (BLL and DAL for example) and create only "Views" for the Web and with Xamarin, Android, iOS and WP, ​​never leaving the C# language, and never needing to learn Java, Swift or Objective C.

Cordova more follows the "mobile app" principle as it is the continuation of PhoneGap, that we could make a web application and run it in a browser, and without Cordova, you cannot call phone commands, such as the Contacts List, the Photo Gallery because we are "locked" only to what the phone browser supports, for example the tel: and mailto: links that open the Phone and Email application respectively.

Is it possible to use native features that are unique to a certain operating system?

Yes, they both have built-in tools that convert the calls into native calls, but Cordova only has a few since it just runs as a webpage. Xamarim has all the native calls of the top 3 mobile systems as it has the ability to create all kinds of applications and not just WebApps.

Are the platforms compatible with each other?

They are two different things, not knowing your resources as a programmer, I say in other words:

  • with Xamarim, you can create a car from scratch
  • with Cordova, you can just create the dashboard view
Scroll to Top