Book Image

Getting Started with NativeScript

By : Nathanael J. Anderson
Book Image

Getting Started with NativeScript

By: Nathanael J. Anderson

Overview of this book

NativeScript allows you to build a fast cross-platform application that has a native UI. NativeScript is a true cross-platform framework that generates native speed applications using the native components of the host platform, all using JavaScript. Although NativeScript allows you to build your application in JavaScript, you have full access to the host OS from your code, allowing you to easily tweak or use new platform features instantly at native code speeds. Whether you have already developed multiple applications or zero applications, this book will help you to develop your next application in a cross-platform framework quickly, saving you a massive amount of time and money. This book concisely shows you NativeScript’s built-in framework that allows you to rapidly develop a fully-working compiled cross-platform application in just a few chapters. It starts by laying the foundation of NativeScript and working through the fundamentals to create a basic shell of the application. Moving on, you’ll see how to build a full-fledged application step by step. We’ll show you how to use plugins, and how to communicate with the native OS libraries easily so that you can customize your application as if your app was created in Java or Objective C. We then deal with the issues that arise from being cross platform and compensate for the different screen sizes, screen resolutions, and device abilities. Finally, we progress to testing and deploying your app.
Table of Contents (15 chapters)
Getting Started with NativeScript
Credits
Foreword
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Foreword

Are you tired of writing the same mobile app from scratch for iOS, Android and Windows? Yes? Then, you should be glad you found NativeScript!

Owing to the mobile platforms diversification, it is clear that to build a successful mobile application, you should make it available on all of the major mobile marketplaces, namely, Apple AppStore, Google PlayStore, and Microsoft Windows Store. This created a need for companies and developers to publish native apps that are available on all three major mobile stores without compromising on the native user experience. The problem, however, is that these three operating systems are very different and companies need to implement three different applications for these stores. Essentially, your company has to write and maintain multiple implementations for the same problem. Teams write (and have to support) the same apps multiple times. There is a good chance that bugs reported on one platform also exist on the others but remain unnoticed. Apps that are meant to behave identically on all platforms may exhibit subtle differences due to their differing implementations. Also, shipping new features at the same time on all platforms is difficult. This is neither optimal, nor very productive and requires a significant investment to gain the knowledge of three different operating systems, languages, IDEs, APIs, and marketplaces. There has got to be a better way. Enter NativeScript—a framework using the native platform APIs, rendering and layout capabilities to deliver ultimate user experience and will allow developers to reuse their coding skills, eliminating the need to learn new languages and IDEs.

The NativeScript framework enables developers to use the pure JavaScript language to build native mobile applications running on all major mobile platforms—Apple iOS, Google Android, and Windows Universal. The application's UI stack is built on the native platform rendering and layout engine using native UI components, and because of that, no compromises with the User Experience of the applications are made. It is also worth mentioning that a full native API access is provided using JavaScript.

This book has everything you need to get started with NativeScript. It starts with the fundamentals, such as the project structure, the command-line interface, how to use basic UI element, how to use third-party native components, and finally, how to target different platforms with NativeScript.

The author, Nathanael Anderson, is one of the faces of NativeScript. He has a deep understanding of how the framework operates from inside out and is the best person who can teach you how to use it.

"I'm confident that by reading this book, you will be able to quickly get into NativeScript and start building your next cross-platform native mobile application."

Valio Stoychev

Product Manager NativeScript at Telerik