Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving from Ionic to NativeScript with at least efforts

What is the fastest way to move (migrate app) from Ionic to NativeScript with the least efforts?

  • Without rewrite old AngularJS controllers and services.
  • And using NativeScript with AngularJS not Angular 2.
  • I need to re-write UI with CSS (replacing HTML with XML) only.

Question is: Does this applicable? or there is no option but to re-write whole app! If yes, what the path that I have to follow to make it?


The story if you want to know why I want to do this:

I have a mobile application that based on Ionic (ionic 1 with AngularJS), Ionic is really nice platform to build app, but a lot of headache specially with performance challenges, in my App I have a really an issue with this through many devices, until I found NativeScript which is really awesome, so I'm thinking about move my current live app from Ionic to NativeScript.

Until now, as I see seems I have to re-write whole app from scratch, but this is costly and not an option for me, I was searching in internet and found no clear answers, even in documentation they seems only using Angular2 with TS (which is better but not have time for this now) or just plan JavaScript.

This is good side reference: Lost in hybrid app frameworks like Ionic, Cordova,

like image 205
Al-Mothafar Avatar asked Aug 21 '16 12:08

Al-Mothafar


People also ask

Is flutter better than NativeScript?

Mobile App PerformanceNativeScript is quicker, however, Flutter app development is liked for more performant mobile applications. One more significant advantage of Flutter is that it uses the resources of the host devices.

Is NativeScript better than ionic?

NativeScript is faster than Ionic because it connect directly with native APIs. NativeScript directly injects IOS and Android APIs into Javascript Virtual Machines. It simplifies development and allows for accessing native APIs directly.

Which one is better ionic or native mobile app?

However, comparing both frameworks, Ionic is far cheaper than React Native. This is because with Ionic you can build hybrid applications that can function across multiple platforms by developing the application just once with a single codebase.

Is NativeScript a hybrid?

Unlike other hybrid frameworks, the NativeScript apps use a single native code set with a user interface designed in XML markup which is converted to native iOS and Android equivalent at compile time, making it compatible for both platforms.


1 Answers

Simply put you can't. Angular 1 is dependent on the DOM. With NativeScript there is no DOM. Which is why you have performance issues in the webview. You need to just bite the bullet and rewrite it with ng2 you'll thank yourself later. The webview is your downfall with your performance on Cordova and to get away from that you'll have better performance and the perf benefits you get with ng2 are also very nice. Heres a link with some good info on ionic 2 to NativeScript but that's as good as it gets. Because you can't easily from Cordova webview app to native UI like NativeScript or react native. https://www.thepolyglotdeveloper.com/2016/05/converting-ionic-2-mobile-app-nativescript/

Here's someone who just went ionic 2 to NativeScript and commented on the slack channel https://nativescriptcommunity.slack.com/archives/general/p1471789794013989 join the slack channel for some really awesome community help if you decide to do it.

like image 121
Brad Martin Avatar answered Oct 13 '22 03:10

Brad Martin