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.
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.
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.
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.
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 customization for the two platforms by using Xamarin Forms, 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.
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
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.
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.
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.
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?
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.
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.
near-native or hybrid?
This is the winning essay by Kasumi Higewake, chosen from 50 entries submitted for consideration in the Iflexion Scholarship Program throughout 2017. Follow us for more news on the upcoming tuition funding opportunities.
Learn about the pros and cons of using Xamarin as your main mobile development platform. All the advantages and shortcomings of ‘near-native’ cross-platform enterprise development laid out in one guide.
Enterprise software is fundamentally about streamlining internal processes, and more companies are realizing the value of mobile apps in achieving this goal.
Curious about how Sencha and its products stack up against the competition. This basic Sencha review will be useful for non-techies who interact with mobile development teams.
WANT TO START A PROJECT?