Hybrid apps are the great way to build cross-platform applications. That Means applications build for web browsers could be converted into Mobile applications for Android or IOS.
But, One big issue with hybrid apps is performance it too bad if we don't design it well. That is because Hybrid app was nothing but web pages wrapped in the web views.
Just so you know, it's like running a mobile browser without any address bar close buttons on it.
Entering Native Script.
In order to solve the above problem in hybrid apps, Native Script deals the issue little differently.
The major difference between hybrid apps and Native Script is that Native Script converts the markup into mobile native components.
<Button tap="buttonTap" text="Submit" />
will be rendered into
on Android and
Isn't it great?
That's the reason it's it 90% equivalent to Native Mobile code. What about other 10%?
Ya, I will explain that. So, now you understand how
UI work. The business logic will work a bit different.
<Page> <StackLayout> <TextField hint="Email Address" /> <TextField hint="Password" secure="true" /> <Button text="Sign in" /> <Button text="Sign up Demo" /> </StackLayout> </Page>
Above is a sample login page in NativeScript. Don't worry about the
NativeScript 2.0 allow us to use AngularJS and TypeScript. So, Same code very less coding curve. The this is important? For example, if you want to fetch remote data, you should learn how to use some nodeJS module to use it. But, With Angular2 you already know how to use
@angular/http module. Angular 2 has so many great features which we can use to design our application for better architecture.
Still not sure?
If you want to test application build with NativeScript on your device. Install the application on your device.
There is the offical showcase on NativeScript website. The apps are created by different people.
Then, It's time to have a look at NativeScript. The great thing about NativeScirpt is that it is totally open source. It is created by Telerik which is known for its frameworks like KendoUI for ASP.NET and HTML5.
In, Next Part we will learn how to setup Native Script and create a simple application using Native Script and angular 2.