When it’s Near-Native vs. Hybrid, it’s Xamarin vs. Cordova

In our Xamarin vs. Cordova comparison, we outline some advantages of each of these two cross-platform development tools for building mobile enterprise apps.

Category
Mobile

Xamarin and Apache Cordova are two of the most talked-about cross-platform development frameworks that enterprise mobile app developers use today, but are either of them a good fit for your first cross-platform project?

While we cannot provide you with a definitive answer to that question—because every enterprise is unique—we can share an objective Xamarin vs. Cordova comparison, to help you and your team come to a decision.

Xamarin vs. Cordova: A Comparative Overview

Before getting into a comparison of specific elements and aspects of using Xamarin vs. Cordova, let’s look at how the two platforms stack up against one another in a general sense, beginning with Xamarin.

Xamarin Overview

Microsoft purchased the Xamarin platform in 2016 and to the relief of many developers already using the framework at that time, has integrated it into its software suite without any radical changes. At the same time, the purchase thrust Xamarin into the spotlight, generating confidence among the development community that it was a robust, well supported, and reliable cross-platform solution.

Xamarin has lived up to that promise in the time since it joined the Microsoft stable and was in use with 1.4 million developers as at April 2017. Today it holds a position just behind Cordova among professional developers’ top ten most preferred frameworks.

The popularity of Xamarin stems from its code-sharing capabilities, which enables developers to build near-native apps for multiple operating systems using only the C# coding language. In short, Xamarin is a cost-effective solution for enterprise app development that minimizes effort and shortens time-to-market by providing coding efficiencies.

Cordova Overview

Like Xamarin, Apache Cordova is a framework for efficient cross-platform app development. However, instead of employing a single codebase for a near-native app appearance and experience, Cordova enables developers to create hybrid apps using standard web technologies, namely JavaScript, CSS3, and HTML5.

While it may not deliver native performance as Xamarin does, Cordova nevertheless manages to streamline enterprise app development and reduce the effort involved in creating apps for various mobile platforms.

That said, where Xamarin is very much a proprietary framework, marketed with enterprises as a primary target, Cordova’s codebase is open source and community-driven, making it a cheaper option that appeals to non-commercial developers and hobbyists, as well as to mobile enterprise app developers in small businesses and larger corporations.

The use of Cordova for enterprise application development tends to divide opinion, particularly regarding apps for healthcare, which typically depend heavily on sensors, and for the finance sector, which requires apps with the highest levels of integrated security.

Even so, developers do use Cordova in both of these industries. According to AppBrain statistics, 16.86% of all Apache Cordova apps had been built for the healthcare domain and 16.18%—for finance.

Today Xamarin holds a position just behind Cordova among professional developers’ top ten most preferred frameworks.
Tweet

3 Big Pros of Xamarin for Enterprise App Development

With the overviews behind us then, it’s time to get a bit more specific in our Xamarin vs. Cordova head-to-head. Rather than the typical pros and cons approach to software comparisons, we will try to keep this article positive in its assessment of each framework, by concentrating on their key advantages, seen from the perspective of the developers who use them. In the case of Xamarin for example, developers cite the following characteristics as being primary advantages.

1. The Value of C# for Mobile Development

Many enterprise-app project teams choose Xamarin because it uses the C# programming language, which is one of the most mobile-friendly codes and according to StackOverflow’s 2018 Developer Survey, is preferred by 35.7% of professional developers.

One of the top performing codes on both Android and iOS, C# facilitates high productivity for developers that are familiar with its use and for those that are not, is relatively easy to learn and master, especially by coders who have experience with object-oriented programming. Other benefits of C# include:

  • Reliability of the code and the ease of bug detection
  • Full interoperability with native code for iOS and Android
  • Advanced and mature runtime that eliminates the complexities of manual memory management
  • Power and flexibility for programmers, courtesy of advanced features like dependency injection and reflection

2. As Native as Near-Native Gets

Xamarin apps are so close to their real native counterparts that some advocates of the platform will argue that describing them as near-native, is to do them an injustice and that actually, they are native.

While that is not an argument that this article will support or refute, there is no doubt that with Xamarin, your developers can create apps that use an operating system’s native controls, call the same UI functions and APIs as native languages, and are natively compiled.

These capabilities together result in apps boasting native performance, behavior, and appearance, so if native is what you want, without the necessity to write an app for each operating system you will deploy to, Xamarin will get you closer to that goal than any other cross-platform tool currently available.

3. Share and Save with Xamarin

Of course, the whole point of cross-platform mobile development is to save time and money, and those savings are eminently achievable when developing with Xamarin, especially given the possibility to share at least 70% of logic written with C# in the concurrent development of an iOS and Android app.

It is even possible to do away with the typical specific UI customization for the two platforms by using Xamarin Forms instead of Native, especially if you do not need a sophisticated user interface for your application. Better still, since the C# code that your developers write is then compiled into the native platform code, your app should perform significantly better than one built with web technology.

Xamarin Big Pros: The Summary

To summarize the benefits of Xamarin’s code-sharing, native development capabilities then, you can create apps for separate mobile operating systems without actually writing each one in its native language, and without suffering performance shortfalls on any of those operating systems.

To translate that into commercial benefits, you get to deliver quality apps for your user-base, with a fast time-to-market, using fewer hours of labor than would be possible if you developed a separate app for each OS.

The savings might be tempered a little by the cost of acquiring Xamarin coders, since they are necessarily familiar with iOS and Android coding, as well as .NET and XML. With this multiple skill set, developers can demand high rates of compensation, depending on where they are based and whether you require them to work on-site or remotely. You can see some typical monthly salaries for Xamarin developers in the US in the chart below.

Then there is the relatively high cost of enterprise licensing imposed by Microsoft, which we have discussed in previous posts about developing with Xamarin, but still, compared with the pure-play native approach, developing with Xamarin should place less of a financial burden on your business.

Meet Xamarin developers ready to tackle you project
Xamarin uses popular C# programming language, allows creating near-native apps, and uses fewer hours of developers' labor.
Tweet

3 Big Pros of Cordova for Enterprise App Development

It would be easy to continue exhorting the benefits of Xamarin for mobile enterprise app development, but since this article is a Xamarin vs. Cordova comparison, it’s time to give the second of the two competitors some airplay.

Mobile business app developers who work with Apache Cordova typically consider the following three framework characteristics to be among the most advantageous. 

1. Plugins Aplenty

It would be remiss to say that Apache Cordova is without limitations as a mobile development platform for enterprises. One of those limitations is its inability to access native APIs directly, which of course Xamarin can do without any issue. However, that does not mean your company shouldn’t consider using Cordova, because a wide range of core plugins exist, enabling your developers to build apps that can access the file system on iOS or Android devices, capture images with a device’s camera, and utilize other onboard features like accelerometers and GPS chips. Moreover, even if no core plugins are available to meet your needs, you may be able to find something suitable among the array of community-developed plugins, or, as Cordova’s codebase is open source, a skilled development team should be able to develop a new plugin suitable for whatever purpose you intend. 

2. Powered by Web Technology

One of the more polarizing aspects of the Xamarin vs. Cordova debate surrounds the two platforms’ very different technologies. Where Xamarin uses compiled code, Cordova users develop apps by using JavaScript for the logic and HTML5/CSS3 for the UI. These technologies, of course, are very familiar to any web developer, and as there is no shortage of those, companies often see Cordova as an appealing solution to build apps without hiring a range of coders with different specializations. Proponents of Xamarin love the fact that it is based on C# coding, and that JavaScript need play no part in their development process. Meanwhile, Cordova fans delight in the ability to use a single set of web tools to create apps for browsers as well as for Android, iOS, and Windows, and without even needing to share code, because the same code is reused for all the different applications.

3. A Great Sense of Community

In contrast to Xamarin and some other cross-platform alternatives, Cordova is at the center of a vast and vibrant development community, which can be a godsend if your company is developing its first mobile enterprise application. Whatever the challenge your team is facing, there will most likely be somebody, somewhere, who has been through the same situation and found a solution. The Cordova community is by no means a passive one, and in addition to helping their peers via Q&A sites like Stack Overflow—where there are currently almost 58,000 Cordova-related questions posted—its members have published massive quantities of sample code and shared a variety of in-depth tutorials online. Coupled with the fact that the Cordova framework is relatively easy to get to grips with (for anyone with the necessary JavaScript, HTML, and CSS skills), this helpful and active developer community makes up for a formal support infrastructure that lacks sophistication in comparison with Xamarin. 

Cordova Big Pros: The Summary

As you may have noticed by now, the top benefits of Apache Cordova, as expressed by more than 400 developers on Stackshare, relate to the ease of use, along with the availability of tools and people to assist developers. These acclamations are in stark contrast to the types of benefits appealing to Xamarin developers, who seem to focus much more on framework performance. The difference in perspective may result from the fact that when it comes to overall performance, Cordova, as already mentioned, does have limitations. Indeed, if you need a cross-platform development tool for a sophisticated enterprise app with a native look and feel, Cordova might not be the right choice for your project. After all, Cordova essentially creates web apps and wraps them in a web view, containing them in a way that should make them almost indistinguishable from native apps when launched on a mobile device. The methodology is perfect for creating social media, business, or lifestyle apps that are low on complexity, and bringing them to market quickly, but doesn't translate so well to the development of complex, high-performance enterprise apps. 

The top benefits of Cordova, as expressed by more than 400 developers, relate to the ease of use, along with the availability of tools and people to assist developers.
Tweet

Xamarin vs. Cordova: Which One to Use, and When?

Enterprise mobile applications can comprise anything from a one-time companion for event-goers or a productivity tool, to an AI-based medical image analysis app for physicians. The complexity, functionality, and performance needs of enterprise apps vary, as does the size of budgets available to meet them. So where do Xamarin and Cordova fit, respectively, into the cross-platform enterprise mobility landscape? 

Xamarin

There is probably no definitive answer to the question posed above, but for the larger company planning a sophisticated app requiring a high degree of user interaction, the costs associated with Xamarin enterprise licensing and dedicated developers may be justifiable. Indeed, the Xamarin framework already has its fair share of users among corporate heavyweights. 

Regardless of your business’ scale, when you need cross-platform versatility with a near-native user experience from your app, then the decision to use Xamarin may be a near no-brainer. Similarly, if you are expecting your company to create and launch new apps regularly, and you would prefer to use a single framework for the sake of continuity, investing in Xamarin could be the way to acquire a tool that meets most needs unequivocally. 

Cordova

For the smaller business, when less sophistication is required, or timelines and budgets are tight, Cordova offers the advantages of true “write-once-run-anywhere” development in an open source environment. With the help (but also the risks) of native plugins, a Cordova app can do what any Xamarin app can, but whether it would do so as effectively, is highly questionable. A decision to develop with Cordova requires thorough consideration as to its compatibility with a given project. That said, it is a highly flexible framework, and where apps are not to be complicated in design, Cordova could work well for teams heavy on front-end expertise and dividing effort regularly between web and mobile development projects. 

Contact us