May 10th, 2017
11:12 am
Posted under Ionic & NativeScript
Permalink
Tags Tip
NativeScript is the newer kid on the block – some of its key differences are as follows:-
- NativeScript uses its own XML based element tags which are compiled to actual native elements in the deployed application.
- This means that your view templates do not use HTML or ‘normal’ css – the elements and attributes are different and therefore there is a learning curve here as you have to learn all the new markup.
- Native feature access such as cameras etc. is easier with NativeScript – with Ionic, often plugins for Cordova are needed, however this appears set to improve fairly soon.
- You still develop with Javascript or TypeScript, and you can use Angular for development. However, I am not clear on how all the dynamic features/specific attributes of Angular which target the HTML DOM will fit in and work with the NativeScript XML elements – I would expect there to be some compromises here on what you can do. NativeScript does support dynamic creation of elements, but I would not expect all this to work in the same way as adding dynamic html/changing innerHTML with Angular for example.
- For development testing, you use an Android or IOS emulator e.g. under Windows. For android debugging, you can attach the Chrome developer tools to debug.
- From the perspective of being a web developer, it looks like Ionic is easier and more familiar in use.
- The key feature with NativeScript is that it does give you true native components, and the apps run faster as they are native. However the app size for download/install is also much larger.
- It does correctly claim to support all its target platforms from a single code base – note that all the targets run native applications.
- Therefore note that it does not create a web app of any kind. Therefore when support for Windows comes out sometime soon, this will be a native application running on Windows.
There are a number of pros and cons and no shortage of discussion on line, and the following posts do some in-depth comparison on this:-
http://pointdeveloper.com/category/nativescript/
http://pointdeveloper.com/nativescript-vs-ionic-framework-pros-cons/
http://stackoverflow.com/questions/40819520/hybrid-app-ionic-vs-nativescript
http://www.discoversdk.com/blog/ionic-2-vs-reactnative-vs-nativescript
https://www.thepolyglotdeveloper.com/2015/11/nativescript-vs-ionic-framework-should-you-switch/