React Native v/s NativeScript v/s Ionic v/s Android/iOS apps




Mobile Application development is undoubtedly one of the most trending things out there and at some point of time, every one using a smartphone would have desired to build a mobile app that they desire or any application with some unique idea that they might have. With the evolution of new technologies every day, there are a lot of ways to develop mobile applications for various platforms, some of which I will be going over through today. This post is for people who already know what these technologies are. I will be comparing them based on various factors. So without further due, let's get started. Also, this will help you decide which one of these technologies you must choose for your next mobile app development project.

Now, your goal is to build a Native mobile app. 2 very straightforward paths: Learn Java(or Kotlin) to develop Android apps and Objective C(or Swift) to develop iOS apps. Now, luckily, if you are a web developer, hold on. Do we need to learn these different languages or can we go with the one we use very frequently? Yes, I am talking about Javascript. So, you can develop mobile applications these days using Javascript and that too using the same Javascript code to develop apps for both Android as well as iOS. Isn't that awesome! So briefly, you have the following options with you :

1. Use a Native Language: Pretty Simple - Learn Java(or Kotlin) for Android and Swift for iOS.

Image result for android java ios swift

2. Use a Hybrid App : A hybrid app is basically a web app that you build with HTML,CSS and Javascript that is wrapped by a WebView. A WebView is simply a UI Component available on both Android and iOS. Basically, Cordova does this wrapping of WebView and so we get a real native app which we can install on our smartphones but basically inside that app is a WebView UI Component that loads our app as a web page inside that WebView. So, in short we have a wrapped Web App in the end. Ionic builds on top of Cordova to make this magic happen!


3. Use a Real Compiled App : Here comes React Native and NativeScript into action. This is basically an app where all the Javascript that you write gets compiled to a real Native app. Talking about React Native(being a core developer myself), you use something called JSX. For NativeScript, you use XML. You do not use standard HTML components but the components that these frameworks give you. The styling rules do look similar to CSS, but behind the scenes, these all get compiled to Native code.( I do plan a blog post covering the basics and building a React Native app in the future) 

Image result for react native   Image result for nativescript

Comparision : 
"Write Once, use everywhere" : This really applies well if I talk about Ionic/Cordova as in the end, effectively you are creating a web app using HTML,CSS and JS and embedding it into a WebView so this works pretty well here. On a broad scale, the below image gives a good insight :


Now, you might find React Native slightly on the right side because it does give you the ability to use Javascript and JSX to build apps for both the platforms but at the same time, it has many Android specific components and many iOS Specific components which push it a little towards the right side.

NativeScript is a little bit more oriented towards the left side because of the flexibility it provides you in its components. 

Now let me come towards the styling part in your app. Java and Swift gives you a lot of components fot the specific platform right out of the box. Same goes with Ionic(not Cordova). As far as React Native is concerned, you do not have much styling and you need to do that by yourself for different components. 

NativeScript pretty much sits on the middle. It gives you many components for both Android and iOS.

Third Party Libraries :
Now as Java and Swift have a lot of third party libraries available as they were designed for this purpose of Core app development. Ionic and Cordova also have good third party libaries support to connect with the device APIs to use Native features such as Camera, GPS etc. React Native pretty much sits in the middle as for any React Native project, you will probably need some third party libaries to get going with your project.

NativeScript falls really back here because its new and that popular in the community as of now. It is becoming really popular, especially amongst the Angular developers but not that popular right now. The following image gives the overall review of the same :


Popularity :
Java/Swift are without a doubt the most popular choice in the community and really goes well plus you will find a lot of tutorials/learning resources to help you get started with them.

React Native is another hot topic and chances are every person into this Computer Science field might have heard of the same. Ionic/Cordova are also popular but not as much as React Native.

NativeScript, on the other hand, is not popular as of now as its new in the market. It will take time to get into the hot section but still very few people know about it and it will definately pick up the hike in the coming future.


Performance :
This is another crucial factor when comparing all of these technologies. Java/Swift without a doubt gives you a very native feel as they were built for that purpose. React Native and NativeScript again gives you really close to Native performance because at the end, it gets compiled to a Native app and you do get a native app in the end. In some cases, React Native has been benchmarked to perform even better than Native Java/Swift apps and that is really awesome. Ionic/Cordova, on the other hand, is not that good if you are looking for a great performance because again, it is essentially a web app.

Accessing Native Device Features :
Again Java//Swift are almost giving you all the capabilities to use all the native device features. Ionic/Cordova do have certain APIs to fulfill that purpose but again that is not a very smooth process to do that. NativeScript gives access to a lot of Native APIs and falls ahead of React Native in this section.


So I guess this was it from my side on this post. This was just to give you guys an overview of these different technologies. You can ofcourse go out there and check the documentation of these frameworks to know more about these. I hope this gave you a nice overview and the top part of these frameworks and comparing them briefly. Thanks for reading. Have a nice day. Keep Coding keep developing! I do have some projects on these technologies on my Github account. Feel free to check that out.

Comments