It is no question that I am pretty familiar with Ionic Framework and Apache Cordova in general. I have a ton of blog articles, YouTube videos and even a beginner level course for Ionic Framework. However, lately I’ve been playing around with NativeScript by Telerik, a similar technology platform that has many advantages over the competitors. I also have blog articles and a beginner level course for NativeScript.
I’m going to do an in-depth comparison between the two hybrid development platforms so you can figure out which is best for you.
Now before I go any further, I should probably state that much of this article will be opinion based. I am going to do my best to back it up with facts wherever possible. I’m not going tell you which you should use, but I’ll leave you with enough information to be able to make the decision on your own.
Let’s start with what we know about both app development platforms according to each of their websites.
Ionic Framework via Drifty:
Free and open source, Ionic offers a library of mobile-optimized HTML, CSS and JS components, gestures, and tools for building highly interactive apps. Built with Sass and optimized for AngularJS.
NativeScript via Telerik:
NativeScript enables developers to build native apps for iOS and Android while sharing the application code across the platforms. When building the application UI, developers use our libraries, which abstract the differences between the native platforms.
We see that Ionic Framework is heavily advertising performance apps built with modern web technologies and NativeScript is heavily advertising single code set apps that use native UIs.
Okay, so what does this mean for us, the developer?
Well, let’s dig a bit deeper before we start jumping to conclusions in regards to what both technology platforms are saying about themselves.
During the development lifecycle of your Ionic Framework app you’ll find yourself needing to use device features and APIs. This is done through Apache Cordova plugins because Apache Cordova is the base technology that powers Ionic Framework. It is also the base technology that powers PhoneGap if you care to know. There are plenty of plugins available, but should you find yourself needing something that isn’t available, you’d have to create a plugin yourself. The challenge here is that Apache Cordova plugins use native device code such as Java or Objective-C. If you don’t know these native languages, then you’re out of luck.
Now that you have a bit of background between the two development technologies, let’s look at the differences between building actual applications. Note that this is NativeScript 1.4 and Ionic Framework 1.0 that I’m comparing.
What does it take to get NativeScript installed on your computer?:
npm install -g nativescript
Similarly, you can install Ionic Framework like so:
npm install -g ionic cordova
In regards to creating a new application and adding the iOS and Android build platforms you can make this comparison, starting with NativeScript:
tns create DemoProject cd DemoProject tns platform add ios tns platform add android
With near identical commands, it would look like this for Ionic Framework:
ionic start DemoProject blank cd DemoProject ionic platform add ios ionic platform add android
Enough with the CLI stuff, let’s look at some UI components.
Here is a simple layout for showing a list view on the screen using NativeScript:
<ListView> <ListView.itemTemplate> <Label text="This is a list item" /> </ListView.itemTemplate> </ListView>
The same layout is accomplished with Ionic Framework like so:
<ion-list> <ion-item> This is a list item </ion-item> </ion-list>
Pretty similar right?
I’d rather not bore you with more UI comparisons because they are all going to look pretty similar. In neither case are you going to say one platform looks way too difficult to attempt using.
Developers want Android and iOS applications that look good. Many of those same developers want mobile applications that look native to how Google and Apple intended. Remember Material Design which Google announced a few years back? This is a design standard for new Android applications. iOS has no concept of Material Design and any iOS app that tries to use it will stand out for the wrong reasons.
This is why I think NativeScript is succeeding against the competition, even beyond Ionic Framework. NativeScript doesn’t force you to share templates between mobile platforms, but instead it chooses the native version of each component even if the UI source code is a single set.
Anyone familiar with my background knows I came from developing PHP ZendFramework web applications. If you’re unfamiliar with ZendFramework, it is a PHP framework split into two versions. There is version 1.x and version 2.x. There is a success and a problem that came out of this. Version 2.x was a complete redesign for performance optimizations among other things that weren’t seen in version 1.x. That’s awesome, but the two major version releases were two very different framework languages. Literally nothing from version 1.x could be applied to 2.x. I spent all this time learning and mastering version 1.x and now I’ve got to try to learn everything again for the same framework.
Where am I going with this?
Ionic Framework is doing the same thing with the switch from Angular 1.x to Angular 2.x. Ionic Framework has been in stable for release only a year and now they are expecting everyone to learn a completely different version of the framework. Sure Angular 2.x will destroy Angular 1.x any day of the week, but learning something new takes time.
Now let’s think of this from a learning perspective. There is a ton of documentation, blog posts, and videos flooding the internet for Ionic Framework 1.x. Filtering through all this 1.x documentation to try to find 2.x documentation is going to be a nightmare. There will be confusion, there will be frustration, and there will be a huge split in the loyal following. Why do you think I don’t use PHP ZendFramework anymore?
Think about the challenge it is going to be to get help in the two versions.
Here is my opinion-based list of pros and cons per each NativeScript and Ionic Framework.
In my opinion, both are very valid and solid ways to build mobile applications. You won’t be disappointed either way. However, if I had to choose, I would go with Telerik’s NativeScript as it stands right now because I’m not a fan of learning a new and very different development technology every time a framework has a major version release. Specifically when major releases are only a year apart.
If you’re interested in checking out my NativeScript beginner level course titled NativeScript 101, you can use coupon code TELERIK10 to receive a 10% discount via the following link.