Xamarin vs Apache Cordova: Which One Is Better?
Too often in life the good is the enemy of the best. Instead of seeking to know the best choice from the good ones, people tend to settle for making things merely good. So, what is ‘the good’ and what is ‘the best’ when it comes to choosing the most suitable cross-platform mobile app framework? There might not be a definite answer, as it all depends on your specific application requirements along with many other factors, like budget, timing, purpose, etc. Yet, two of the most popular mobile tech stacks – Xamarin and Apache Cordova – should be given serious thought before any decision is made. (There’s also been quite a lot of buzz around React Native lately, a rising rock star in multiplatform mobile development, and it’s definitely worth the hype. Just stay tuned for our blog updates!).
So, what do these two cross-platform environments have to offer? How do they even compare? Here’s our take on the differences between Xamarin and Apache Cordova and the benefits that each solution brings to the table.
Now let’s take a look at some of the strengths and weaknesses of each tool. With Cordova, the developer only needs to create one app and it will appear the same on multiple device platforms, which is both a blessing and a curse. While it may be a huge plus if the same UI is desired on all platforms, Cordova loses some of its value for code sharing when the UI is supposed to be different across platforms. By contrast, one of the key advantages of Xamarin, is the ability to generate reusable code – up to 80%. However, the same code-sharing levels in Cordova can be achieved through the power of CSS frameworks.
Xamarin also offers considerably better UX, functionality and performance. It compiles to a native code and grants access to native APIs through C# wrappers, thus making Xamarin apps, if well written, look and feel fully native, much like their native counterparts. Too much of a challenge for Cordova! With all native controls represented, Xamarin is generally believed to be the closest thing to native when no native language is there. It also provides ongoing support for adding new features and making modifications as the underlying native technology changes. It’s quite a toughie to react to constant changes, though Xamarin has been really good at it most of the times.
What’s actually really great about Apache Cordova is that it has a large community of techies always ready to answer all your questions. The level of interaction and support within Xamarin community does not come even close to that of Cordova, though it is also growing fast, almost exponentially.
Let’s delve deeper and compare these two side by side.
Xamarin vs Apache Cordova Comparison
|Platform support||iOS, Android, Windows Phone||iOS, Android,,Windows Phone, Blackberry|
Free for non-commercial use
Professional and Enterprise licences for businesses
|Free to use
Large community for support (Github, Stack overflow)
Lots of plugins available
Ability to create individual UI for different platforms
Applications capture the correct look and feel for each platform
All native features are supported and can be implemented
More responsive UI
|No native look for different platforms
Capturing the correct look and feel for each platform requires extra work
|Code sharing||High – reusable code up to 80%||High – if UI is the same on all platforms
If UI is different across platforms, the same 80% can be easily achieved using CSS frameworks
Possibility to display big amount of data in lists
|Multithreading is possible using plugins or Objective C/Java to make parallel execution
Large lists or grids render slow
|Native performance||Stable high performance on iOS, Android and WinPhone devices, if implemented correctly||May be slow on older Android devices and iPhone 4, but, if implemented correctly, high on new devices|
|Access to Device API||Full||Full (using plugins)|
|Execution speed on the device||High speed launching||Long initial app startup time|
By sharing our brief insights into Xamarin vs Apache Cordova comparison, we have just scratched the surface – there’s so much more to it. What really matters here is the awareness that the best tool is the one that best serves the purpose of your project. Neither is perfect. Neither is a wrong choice. Each has its own share of features and support. It’s just that one alternative may be better than the other depending on your specific situation, application requirements, budget, time to market and many other variables.
Do you know all advantages and disadvantages of Xamarin? Check out Xamarin Pros and Cons for Cross-Platform Development.