万本电子书0元读

万本电子书0元读

顶部广告

Getting Started with NativeScript电子书

售       价:¥

2人正在读 | 0人评论 9.8

作       者:Nathanael J. Anderson

出  版  社:Packt Publishing

出版时间:2016-01-28

字       数:139.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Explore the possibility of building truly native, cross-platform mobile applications using your JavaScript skill—NativeScript!About This BookSave your marketing time by building for iOS, Android, and Windows Mobile platforms simultaneouslyBe an ace at utilizing the features of NativeScript and its ability to communicate with each of the host device libraries nativelyProficiently, build your fully cross-platform communication application exhibiting the fundamentals of NativeScriptWho This Book Is ForIf you are a JavaScript developer and want to build cross-platform applications, then this book is just the right one for you!What You Will LearnInstall and compile your application in NativeScriptGet important know-how on the NativeScript project structureDevelop and style your screens for multiple platformsCreate a full-featured cross-platform communication applicationImport and use several third-party componentsSimplify and deal with device resolution and cross-platform issuesTest and deploy your applicationIn DetailNativeScript 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.Style and approach A stepwise guide for building cross-platform mobile applications with the help of easy-to-understand examples.
目录展开

Getting Started with NativeScript

Table of Contents

Getting Started with NativeScript

Credits

Foreword

About the Author

About the Reviewer

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Introduction to NativeScript

NativeScript

Telerik's NativeScript

Other competitors

NativeScript uniqueness

NativeScript is easy

NativeScript and TypeScript

What is TypeScript?

TypeScript's use in NativeScript

Choosing a development language

Common modules

Installing NativeScript

Prerequisites

node.js

iOS

Android

Installation

Installation help

The NativeScript command line

NativeScript commands

Creating your first application

Creating the application in easy steps

Running the app

Summary

2. The Project Structure

Project directory overview

The root folder

The app folder

The lib folder

The hooks folder

The node_modules folder

The tns-core-modules folder

The platforms folder

The platforms/android folder

Bad resource files on Android

Compiled Android application location

The platforms/iOS folder

The app folder

The .gradle folder

The App_Resources folder

The fonts folder

The app folder files

The package.json file

License

App.js

App.css

Application page

The main-page.js file

The main-page.css file

The main-page.xml file

The main-view-model.js file

Our rewrite of the main-view-model.js file

Foundational components

Application component

Frame component

Page component

Creating a second page

Creating additional files and pages

Creating settings.js

Navigating to another page

Running the application

Viewing our screen

Summary

3. Declarative UI, Styling, and Events

Declarative UI

XML parser

Page, StackLayout, label, and more

<Page ...> node

<StackLayout ...> node

<Label ...> node

FormattedString component

Complex properties

<Button ...> node

Second <Label...> node

Declarative UI and components

Visual components

Using the Declarative UI for our settings page

Our settings.xml file

Binding and event system

Event system

Binding

Styling the UI

What is CSS?

Why use CSS?

How to use CSS

Configuring your CSS Rules

Existing CSS properties

Exploring app.css

Trying CSS out and styling our application

Styling on your own

Summary

4. Building a Featured Application

Layouts

StackLayout

WrapLayout

AbsoluteLayout

DockLayout

GridLayout

Building our featured application

Nonvisual components

Dialogs

Alert dialog

Confirm dialog

Prompt dialog

Login dialog

Action dialog

Promises

The settings screen Declarative UI

GridLayouts

Building the main screen

JavaScript code

Declarative UI

Main page Declarative UI

Main page body

ScrollViews

More about bindings

Repeaters

Main-body footer

The main-page.css file

Application CSS

Fonts

Icons

Communication with the server

Trying out our application

The server

Setting up your own server

Trying crossCommunicator out.

Summary

5. Installing Third-Party Components

Places to find third-party components

The Telerik plugin site

npmjs.com

The NativeScript unofficial plugin list

How to install a third-party plugin component

Installing the vibration plugin

Installing the webSockets plugin

Installing the Telerik SideDrawer plugin

Using third-party components

Using the vibration plugin

Using Websockets

Using Telerik's side drawer

Easily using the components

Useful third-party components

Summary

6. Platform Differences

Android and iOS differences

The soft keyboard

The Page.loaded event

Code differences

Platform classes

Declarative UI

Declarative UI properties

Declarative UI platform qualifiers

Platform- and device-specific files

Screen size differences

Fonts

Our own custom resource folders

Compiled application resources on iOS

Compiled application resources on Android

Device differences

Summary

7. Testing and Deploying Your App

Testing your application

Test frameworks

Local testing of your code

Unit testing on the device

Installing the test framework

Writing tests

Running tests

Testing your app on a device or emulator

Understanding the call stack

Android call stack

iOS call stack

Debugging your application

Publishing your application

Publishing to iOS

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部