Nativescript

31
04.10.2016 Yusuf Koraman - Software Architecture NATIVESCRIPT

Transcript of Nativescript

Page 1: Nativescript

04.10.2016Yusuf Koraman - Software Architecture

NATIVESCRIPT

YUSUF KORAMAN
Page 2: Nativescript

• Web / Hybrid / Native• What’s Nativescript ? • IOS & Android Versions• Nativescript Runtime• IDE• Popular CLI Commands• Nativescript loves Angular2…• Components & Layouts• CSS Support• Demo• Debugging• Showcases• Question

Content

Page 3: Nativescript

Native / Hybrid / Web

Page 4: Nativescript

A runtime for building and running native iOS, Android, and (soon) Windows Phone apps with a single, JavaScript code base

What’s Nativescript ?

Page 5: Nativescript

Use existing JS and CSS ,xml / html skils ES 6 & Typescript Restricted Css Support. First public beta Released @ 5 March 2015 Release v1.0 @May 2015 Created &

Supported by Telerik.

What’s Nativescript ?

Page 6: Nativescript

Learning Curve is Low. Two way binding. Angular2 Support. Fully open source

What’s Nativescript ?

Page 7: Nativescript

https://github.com/NativeScript

What’s Nativescript ?-Git-

Page 8: Nativescript

What’s Nativescript ?-Modules-

Page 9: Nativescript

0 days support for new features ! Is actually native No Mac required to

build for iOS

What’s Nativescript ?

Page 10: Nativescript

Min IOS VersioniOS 7 or greater and xcode version greater than 6

Min Android VersionApi 17(Version 4.2)

IOS & Android Versions

Page 11: Nativescript

Nativescript Runtime

Page 12: Nativescript

Nativescript Runtime

Page 13: Nativescript

Visual Studio Code (recommended) Has Nativescript & Angular2 Plugins.

Visual Studio Has telerik plugins & Project templates

Any Text Editor. Because of CLI & Javascript & html/xml

IDE

Page 14: Nativescript

IDE

Page 15: Nativescript

IDE

Page 16: Nativescript

npm i -g nativescript tns create my-app-name –ng tns platform add ios/android tns run ios/android –emulator tns livesync ios/android --emulator –watch tns livesync android/ios –watch Tns run ios/android (Deploy code to connected

device)

Popular CLI Commands

Page 17: Nativescript

=

Nativescript loves Angular2…

Page 18: Nativescript

Nativescript loves Angular2…

Page 19: Nativescript

Nativescript loves Angular2…

Page 20: Nativescript

Absolute Dock Grid Stack Wrap

Components & Layouts

Page 21: Nativescript

Application wide CSS Ex: nativeScriptBootstrap(ListTest, null, {"cssFile": "style.css"});

Component base CSS Ex:@Component({ selector: 'list-test', styleUrls: ['style.css'], template: ...

Inline CSS <Button text="inline style" style="background-color: green;"></Button>

CSS Support

Page 22: Nativescript

Type selector : button { background-color: gray }

Id Selector : #login-button { background-color: blue }

Hierachical selector(CSS Combinators) StackLayout Button { background-color: blue; }

Css on Native components. StackLayout { orientation: horizontal; }

Import External CSS @import { url('http://some-domain.com/your-style.css') }

CSS Support

Page 23: Nativescript

CSS Support

Page 24: Nativescript
Page 25: Nativescript

With CLI; tns debug android tns debug ios

Debugging

Page 26: Nativescript

Debugging With Visual Studio Code

Debugging

Page 27: Nativescript

Debugging

Page 28: Nativescript

https://www.nativescript.org/showcases

Showcases

Page 29: Nativescript

Google Trends

Page 30: Nativescript

Google Trends

Page 31: Nativescript

Questions