React Native Vs Cordova - Which is Best For Multi Platform Apps?

Page 1

Multi Platform Apps: Which Approach To Choose Between React Native and Cordova?


Recently we have witnessed great changes in the mobile cross-platform development sector and the technological field that uses web languages. Of all the advances, the protagonism of what we are going to speak today is undeniable: Cordova and React Native. First of all, let’s make a reminder about what a native application is and what is a hybrid application. There are two types of technologies for the development of applications: Cross-platform and Native. Hybrid apps (Cross-platform) are developed using HTML5, CSS and Javascript, that is, they use the same code regardless of the platform on which they are run. On the other hand, the native app is developed in the language required by the target platform: Objective-C and Swift for iOS, Java for Android, etc. So let’s understand in five detail rounds! Round 1: Develop Native or Hybrid? Cordova Cordova formerly known as PhoneGap, a framework developed to create hybrid applications. It makes use of web technologies to render the application, so it requires Apache Cordova so that it can have access to the native features of the device. The main disadvantage in developing hybrid apps is the lack of user experience that is specific to each platform. React Native React Native is a framework for creating native apps. It is mainly done with javascript, being able to reuse the same code between platforms. However, while hybrid apps render using HTML and CSS, React Native will render using the native components of the platform, meaning the user experience will be very close to other native apps developed in the platform language, not to mention that a better performance and smoother animations are achieved. The disadvantage of using React Native, is the need to have components to bridge the platform, it is worth remembering that many components are already provided by default, but might end up needing a component that has not yet been made portability. And the winner is: React Native, while we can create native apps which requires a kind of bridge for each platform to develop, but it can bring as close as possible to building native apps for each platform. Round 2: Write once, run everywhere vs. Learn once, write everywhere Cordova

The Cordova follows the philosophy of “Write once, run anywhere,” meaning a hybrid application will use the same indifferent code as the platform and that’s what Cordova is capable of doing. However, in order to be more “native”, the Cordova adapts to some specific behaviors of each platform. If you use tabs, they will be shown the same as if it is recommended for each platform i.e in the lower part of the screen when in iOs, and on top in Android.


React Native React Native follows the “Learn Once, Write Anywhere� philosophy, that is they want developers to use the components that best follow the native concept of each platform. For example, Android has a bar of tools so it is possible to make several customizations, since iOS does not. You can use the toolbar for Android but already on iOS you will have to use something different but do not worry as there are several equivalent components to use. And the winner is:

React Native, because with it we have been able to provide a better user experience by writing applications that fit each OS in the standard way. Round 3: Language Cordova

It is an Angular based framework. It uses HTML templates for its views, following the Model-View-Controller pattern, where views and logic are clearly separated. React Native React Native is based on React, which uses a Javascript code that resembles HTML but essentially is not. They call this JSX, display logic is mixed with business logic. Lately, this is not a problem since most Remote React Native Developer feel comfortable using JSX but when working on a team with collaborating designers it will not be so simple for them to help create templates with HTML/CSS. And the winner is: Draw, because with Cordova the developer will be more comfortable since it is the classic HTML and CSS. With React Native, it will have to learn how to use the styles and create the interfaces using the components which are similar to HTML, not difficult, but something new. Round 4: Testing During Development Cordova When you are developing an app, it is very important to be seeing in real time the modifications that are being made. There is nothing more frustrating than having to wait a while to be able to see if the 5 margin pixels that have been changed are good or if it is better to put 8 pixels. With Cordova, these changes can be seen instantly in the browser or in the device itself, because automatically when the code that is working is saved it gives a refresh in the application.


React Native With React Native, the preview of modifications are in another level so forget tests in the browser, because as it has been said that it renders natively. To visualize the modifications it is not necessary to recompile the application as the result is immediately shown in the emulator of the device. And the winner is: React Native, because it allows you to view the changes with the refresh of the page and also without the refresh by showing the changes in real time. Round 5: Plugins and Community When it’s decided to use an Open Source project it’s important to look at how active is the surrounding community. As it directly impacts how easy it will be to find information and answers to your questions or even fix those bugs that appear at one time or another. Cordova PhoneGap which is alive in the market at the same time so there is a great possibility of already having a plugin that will solve the problem or make it implement a feature faster. They also have a virtual store where developers sell plugins. React Native There are several plugins in NPM for React Native. It even has a plugin to use the PhoneGap/Cordova plugins, which means that we instantly have the legacy of several mature plugins from another community. Not counting this page, which contains a huge catalog of plugins that can be used with React Native. And the winner is: Currently, React Native has more stars in Github than Cordova, about 39k vs 26k. However, since Cordova is the longest in the market, there are more questions in Stackoverflow. So it’s true to say that we have a draw, as both have a very active community, and continue to grow. Final Round: Which is the best It is almost impossible to say which is the best as we strongly believe that depends on some factors such as: your preference, your project, the requirements of the project, the skills that you and your team have. Both are similar in some points and what they set out to do, do well. It would be like comparing Xbox and Playstation, as one as another will have positive and negative points, but in the end one is not better than the other. However, without a doubt the React Native is what we recommend because we believe that rendering natively is much better than displaying the content in a webview, for several factors. Rest you will understand when you talk to or Hire React Native Developer from Bacancy Technology.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.