Milan Nankov

Milan Nankov
Yesterday Telerik had their NativeScript Release Webinar which introduced NativeScript to the developer community. NativeScript is a new framework for building native apps that allows developers to share code across iOS, Android, and Windows. I am not going to explain how NativeScript works (you can check out the documentation) but instead I am going to highlight its features and share my first impressions after spending some time experimenting with it.

NativeScript Is Cool

NativeScript is built on Telerik's past experience with wide range of frameworks and technologies like WPF. They have managed to distill their knowledge in a very promising package for native app development.

Truly Native

I have already mentioned this but let's reiterate - unlike other platforms for cross platform development, NativeScript produces native apps from a single code base. What's more, you have access to 100% of the API for each native platform.

Shared Code Base

NativeScript allows you to build your business logic with JavaScript or TypeScript, and design and style the UI using XML and CSS. Once you have those, the NativeScript framework will handle the translation of your JavaScript/TypeScript and XML code to platform-specific code be it iOS, Android or Windows Phone.

Embraces Separation of Concerns

NativeScript apps are built around the MVVM pattern which provides a clean separation of concerns between the UI and the business/app logic. Having a framework that encourages you to have a clear separation of concerns from the get go, I believe, increases your changes of shipping better quality software. Simply encouraging you to think about MVVM from the start is amazing and while it will certainly not stop you from conjuring a spaghetti code mess, it will at least attempt to nudge you in the right direction.

Bindings? Yes, please!

If you had the change of using a framework like WPF you know how helpful bindings are.  Of course, you can do everything that bindings do with code but your code will never be able as maintainable, as easy to use, and as readable as a simple binding declaration. Having bindings built into the core of NativeScript is very appealing.

NativeScript Tooling

At the moment there are two options for developing NativeScript apps - The NativeScript CLI and The AppBuilder Tool Set. I really like that Telerik provides several options for developers to choose from instead of trying to force devs to use only one environment. If a developer is spending most of his time in Visual Studio it will be quite difficult to force him to adopt new IDE and a new way of doing things. Bringing NativeScript to the developers is smart, and in my opinion, the correct approach. So, onto the options:

NativeScript CLI

NativeScript Command-Line Interface allows devs to create, develop, build, and test apps on their local machine free of charge. You are free to use an IDE or a text editor of your choice and start developing native apps in minutes. By following the setup instructions and using Sublime text editor I was able to build the "Hello, World" app and start experimenting with it in a matter of minutes.

The AppBuilder Tool Set

The other option is to use the so called AppBuilder. AppBuilder also allows you to create, develop, build, and test native apps but this time utilizing the power of the cloud and without having to install additional dependencies. AppBuilder has several flavors: In-Browser, Windows Client, Extension for Visual Studio, and AppBuilder Command-Line Interface. Since I love my Visual Studio I tried the extension. app-builder-extension Once the extension is installed, you can choose from several NativeScript project templates which can get you started really fast. Once again I was able to follow the quick-start guide without any problems and run my cross-platform app.

To Sum Up

Being able to build native apps for all major platforms with 100% shared code (or at least close to 100%) is the Holy Grail of mobile app development. From what I have seen so far, I am very excited about NativeScript. The NativeScript framework is built on Telerik's experience with frameworks and technologies like WPF, Silverlight, XAML, HTML, and CSS, and they have managed to combine the best of all worlds into a single package.

So the framework looks great, what I am looking forward to is to see how the tooling around the framework will evolve because this will be the most important part.  I will be exploring the NativeScript framework in the next couple of weeks and I will be sharing my findings here. Cheers!

If you found this article useful, could you hit any of the share buttons below, so that others can benefit from it, too? Thanks!

Need consulting on this topic?

Yes No