SlideShare a Scribd company logo
1 of 23
Native Script – What you need to be Aware
Agenda
• Overview of Native Script
• Pre-Requisites for Native Script
• Native Script App Folders
• Basic Commands of Native Script
• Native Script Controls
• Demo using Native Script –Play Ground
My Intro
• Baskar Rao
• Senior .Net Consultant with Compunnel Software Group.
• @baskarmib
• https://www.linkedin.com/in/baskarrao-dandlamudi
• baskarrao.dandlamudi@outlook.com
• www.compunnel.com
• https://github.com/baskar3078
Native Script - Overview
• Native Script is free open source framework
for building native IOS and Android Apps.
• Build Cross Platform mobile apps using single
code base.
• Develop Mobile Apps using JavaScript ,
Angular , Typescript and Vue
Why Native Script
• Web Developers with knowledge of HTML,
CSS and JavaScript can use the same to
develop rich native mobile applications.
• Easily develop apps using existing plugins
from npm [Node], Gradle [Android] and IOS
Plugins.
• Easy to learn and develop apps using pre-
defined templates.
Pre-Requisites of Native Script
• Prior Knowledge of HTML, CSS and any one
of scripting language JavaScript , Angular,
Typescript or Vue
• Node.js Server, Command Line Terminal and
Preferred Text IDE Editor
• Android Studio, Android SDK and Android
Emulator, Java SDK
Native Script – App Structure
Native Script App Structure
• Any Native Script app contains the below
folders
• Root – Project Name
• App Folder
• Node_Modules
• Package.Json
• Platforms
App Structure
• App Folder
This folder contains all the development
resources like forms, js files
• Node_Modules
This folder contains application npm module
dependencies. The tns-core modules folder
contains Native Script related javascript modules
which can be used to develop features in the
application like http calls, access files etc.
• Package.Json
Details of application and the version of native script
used and other npm modules used in the application.
• Platforms
This folder contains platform-specific code which
Native Script needs to build IOS or Android Apps. This
is mostly generated code by Native Script CLI.
App Structure - Contd
• App_Resources
This folder contains platform specific resources.
• Shared
This folder contains files that needs to be shared across views
In app.
• Views
This folder contains the code to build apps views. Each view is made
Up of XML File, a Javascript file and optional css file.
• App.css
File contains global styles used in the app.
• App.Js
This file sets up applications starting module and initializes the app.
Native Script CLI Basic Commands
• tns create appname --template template name
The above command is used to create a native script app using
Native Script CLI.
• tns build android
This command is used to build nativescript app using android platform
• tns build ios
This command is used to build nativescript app using ios platform
• tns run android --emulator
This command is used to build and deploy your app using android emulator
IOS related commands cannot be run in Windows OS. They can be used only in Mac.
Native Script Controls
What makes a Native Script View
• Native Script View is comprised of three files.
-- ViewName.xml
-- ViewName.css
-- ViewName.js
• Xml file is used to design the screen layout and screen controls.
• Css file is used to mention css class specific to the view.
• Js file acts as the code behind file similar to aspx.cs for an aspx page.
Native Script View Models
• Native Script View Models are used to enable two way data flow between model and view
• Native Script uses the observable module to facilitate the binding between view and model
var observableModule = require("data/observable");
• The properties defined in view model can be accessed in view using the “{{ propertyname }}” syntax
<TextField id="email" text="{{ email }}" keyboardType="email" autocorrect="false" autocapitalizationType="none" />
Native Script Basic Controls
HTML Control Native Script Control
<div> LayOut – Stack Layout, Grid LayOut, Wrap
LayOut, FlexBox Layout, Dock Layout
<input type="button" value=“Sign In"
onclick=“signIn()">
<Button text=“Sign In" tap="signIn"/>
<label>Click me </label> <Label text="{{ name }}" />
<img src="mdn-logo-sm.png" alt="MDN"> <Image src="res://logo" ></Image>
<input id="email" type="email"> <TextField id="email" text="{{ email }}"
keyboardType="email" autocorrect="false“
autocapitalizationType="none" />
Native Script Basic Controls
TextField
<TextField id="email" text="{{ email }}" keyboardType="email" autocorrect="false“
autocapitalizationType="none" />
• Id – Used to define a unique identifier for the property
• Text – Used to define the text which is binded to the TextField. Use of {{ }} binds it property in viewModel.
• keyboardType – This is used to determine the keyboard layout. Email is used for email fields and Secure is used for
password fields.
Label
<Label text="{{ name }}" horizontalAlignment="left" verticalAlignment="center"/>
• Text – Used to define the text which is binded to the Label. Use of {{ }} binds it property in viewModel.
Native Script Basic Controls
Image
<Image src="res://logo" stretch="none" horizontalAlignment="center" ></Image>
• Src field is used to load the image from resources. Native script makes sure load the appropriate image from android
platform for android and ios platform for ios.
Button
<Button text="Sign in" tap="signIn"/>
• Tap Property is used to mention the code behind which needs to be executed on click of the Button.
Dev Tools
• Visual Studio Code
Native Script extension can be used to develop and debug NativeScript Applications.
Create a native script app using tns create app command.
Navigate to the app folder.
Enter code . Command .
• Chrome Developer Tools
Chrome Developer Tools can also be used to debug NativeScript Applications.
Dev Tools
• Native Script Play Ground
Native Script Play Ground is a browser based platform to develop and preview mobile applications
Dev Tools
• Native Script Side Kick
Can be used to develop applications with pre-defined starter templates
Perform cloud or local builds and deploy to test devices
Helps to develop IOS Applications on Windows O/S
Walkthrough
• Demo of an existing app using Play Ground
• Demo live sync feature
• Demo how to make API calls using Fetch Module.
The app used in the demo is from Native Script tutorial
Further Resources
• Native Script - Documentation
• Native Script eBook is free book by @brosteins available for download
• Native Script Blog
• Native Script Code Snippets
• Native Script Playground - Browser based development tool
• Native Script Sidekick – Useful for developing IOS apps on Windows Machine
Questions
https://www.linkedin.com/in/baskarrao-dandlamudi
baskarrao.dandlamudi@outlook.com
https://baskarrao.wordpress.com/
Thanks to Atlanta Code Camp team for providing an opportunity to present.

More Related Content

What's hot

React Native - Why Designers should use React native. And everyone else too.
React Native - Why Designers should use React native. And everyone else too.React Native - Why Designers should use React native. And everyone else too.
React Native - Why Designers should use React native. And everyone else too.Val Scholz
 
An iOS Developer's Perspective on React Native
An iOS Developer's Perspective on React NativeAn iOS Developer's Perspective on React Native
An iOS Developer's Perspective on React NativeAleksandras Smirnovas
 
Mobile App Development Using Appcelerator and DNN WebAPIs
Mobile App Development Using Appcelerator and DNN WebAPIsMobile App Development Using Appcelerator and DNN WebAPIs
Mobile App Development Using Appcelerator and DNN WebAPIsDNN
 
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...Codemotion
 
Intro to react native
Intro to react nativeIntro to react native
Intro to react nativeModusJesus
 
Introduction to the Ionic Framework
Introduction to the Ionic FrameworkIntroduction to the Ionic Framework
Introduction to the Ionic Frameworkrrjohnson85
 
Putting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native BostonPutting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native Bostonstan229
 
Quick run in with Swagger
Quick run in with SwaggerQuick run in with Swagger
Quick run in with SwaggerMesh Korea
 
DNN Connect - Mobile Development With Xamarin
DNN Connect - Mobile Development With XamarinDNN Connect - Mobile Development With Xamarin
DNN Connect - Mobile Development With XamarinMark Allan
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneTroy Miles
 
Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkCihad Horuzoğlu
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Nativedvcrn
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Mark Leusink
 
Ionic framework one day training
Ionic framework one day trainingIonic framework one day training
Ionic framework one day trainingTroy Miles
 
Mobile Applications with Angular 4 and Ionic 3
Mobile Applications with Angular 4 and Ionic 3Mobile Applications with Angular 4 and Ionic 3
Mobile Applications with Angular 4 and Ionic 3Oleksandr Tryshchenko
 
Building Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicBuilding Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicKadhem Soltani
 
Creating an hybrid app in minutes with Ionic Framework
Creating an hybrid app in minutes with Ionic FrameworkCreating an hybrid app in minutes with Ionic Framework
Creating an hybrid app in minutes with Ionic FrameworkJulien Renaux
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React NativeSambhu Lakshmanan
 
Ionic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile appsIonic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile appsAndreas Sahle
 

What's hot (20)

Android - Anroid Pproject
Android - Anroid PprojectAndroid - Anroid Pproject
Android - Anroid Pproject
 
React Native - Why Designers should use React native. And everyone else too.
React Native - Why Designers should use React native. And everyone else too.React Native - Why Designers should use React native. And everyone else too.
React Native - Why Designers should use React native. And everyone else too.
 
An iOS Developer's Perspective on React Native
An iOS Developer's Perspective on React NativeAn iOS Developer's Perspective on React Native
An iOS Developer's Perspective on React Native
 
Mobile App Development Using Appcelerator and DNN WebAPIs
Mobile App Development Using Appcelerator and DNN WebAPIsMobile App Development Using Appcelerator and DNN WebAPIs
Mobile App Development Using Appcelerator and DNN WebAPIs
 
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
React Native - Unleash the power of React in your device - Eduard Tomàs - Cod...
 
Intro to react native
Intro to react nativeIntro to react native
Intro to react native
 
Introduction to the Ionic Framework
Introduction to the Ionic FrameworkIntroduction to the Ionic Framework
Introduction to the Ionic Framework
 
Putting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native BostonPutting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native Boston
 
Quick run in with Swagger
Quick run in with SwaggerQuick run in with Swagger
Quick run in with Swagger
 
DNN Connect - Mobile Development With Xamarin
DNN Connect - Mobile Development With XamarinDNN Connect - Mobile Development With Xamarin
DNN Connect - Mobile Development With Xamarin
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and Backbone
 
Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic Framework
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)
 
Ionic framework one day training
Ionic framework one day trainingIonic framework one day training
Ionic framework one day training
 
Mobile Applications with Angular 4 and Ionic 3
Mobile Applications with Angular 4 and Ionic 3Mobile Applications with Angular 4 and Ionic 3
Mobile Applications with Angular 4 and Ionic 3
 
Building Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicBuilding Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and Ionic
 
Creating an hybrid app in minutes with Ionic Framework
Creating an hybrid app in minutes with Ionic FrameworkCreating an hybrid app in minutes with Ionic Framework
Creating an hybrid app in minutes with Ionic Framework
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Ionic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile appsIonic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile apps
 

Similar to Native Script Atlanta Code Camp

NativeScript 環境のインストールとはじめてのプロジェクト実行
NativeScript 環境のインストールとはじめてのプロジェクト実行NativeScript 環境のインストールとはじめてのプロジェクト実行
NativeScript 環境のインストールとはじめてのプロジェクト実行Osamu Monoe
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_uDoris Chen
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titaniumNaga Harish M
 
Building your first android app using Xamarin
Building your first android app using XamarinBuilding your first android app using Xamarin
Building your first android app using XamarinGill Cleeren
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumTechday7
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Visug
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms BootcampMike Melusky
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegapRakesh Jha
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegapRakesh Jha
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioMizanur Sarker
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularTodd Anglin
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsJohn M. Wargo
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAmazon Web Services
 
An overview of mobile html + java script frameworks
An overview of mobile html + java script frameworksAn overview of mobile html + java script frameworks
An overview of mobile html + java script frameworksSasha dos Santos
 
Develop business apps cross-platform development using visual studio with x...
Develop business apps   cross-platform development using visual studio with x...Develop business apps   cross-platform development using visual studio with x...
Develop business apps cross-platform development using visual studio with x...Alexander Meijers
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache CordovaIvano Malavolta
 
Ignite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and FirebaseIgnite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and FirebaseJen Looper
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradioDroidcon Berlin
 

Similar to Native Script Atlanta Code Camp (20)

NativeScript 環境のインストールとはじめてのプロジェクト実行
NativeScript 環境のインストールとはじめてのプロジェクト実行NativeScript 環境のインストールとはじめてのプロジェクト実行
NativeScript 環境のインストールとはじめてのプロジェクト実行
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_u
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Building your first android app using Xamarin
Building your first android app using XamarinBuilding your first android app using Xamarin
Building your first android app using Xamarin
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegap
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegap
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
 
An overview of mobile html + java script frameworks
An overview of mobile html + java script frameworksAn overview of mobile html + java script frameworks
An overview of mobile html + java script frameworks
 
Nativescript
NativescriptNativescript
Nativescript
 
Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
 
Develop business apps cross-platform development using visual studio with x...
Develop business apps   cross-platform development using visual studio with x...Develop business apps   cross-platform development using visual studio with x...
Develop business apps cross-platform development using visual studio with x...
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
Ignite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and FirebaseIgnite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and Firebase
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
 

More from Baskar rao Dsn

Play with azure functions
Play with azure functionsPlay with azure functions
Play with azure functionsBaskar rao Dsn
 
Azure Functions in Action #CodePaLOUsa
Azure Functions in Action #CodePaLOUsaAzure Functions in Action #CodePaLOUsa
Azure Functions in Action #CodePaLOUsaBaskar rao Dsn
 
Azure Functions in Action #OrlandoCC
Azure Functions in Action #OrlandoCCAzure Functions in Action #OrlandoCC
Azure Functions in Action #OrlandoCCBaskar rao Dsn
 
Era of server less computing
Era of server less computingEra of server less computing
Era of server less computingBaskar rao Dsn
 
Era of server less computing final
Era of server less computing finalEra of server less computing final
Era of server less computing finalBaskar rao Dsn
 
Steps to publish an application to azure service fabric
Steps to publish an application to azure service fabricSteps to publish an application to azure service fabric
Steps to publish an application to azure service fabricBaskar rao Dsn
 
Azure service fabric overview
Azure service fabric overviewAzure service fabric overview
Azure service fabric overviewBaskar rao Dsn
 

More from Baskar rao Dsn (8)

Play with azure functions
Play with azure functionsPlay with azure functions
Play with azure functions
 
Azure Functions in Action #CodePaLOUsa
Azure Functions in Action #CodePaLOUsaAzure Functions in Action #CodePaLOUsa
Azure Functions in Action #CodePaLOUsa
 
Azure Functions in Action #OrlandoCC
Azure Functions in Action #OrlandoCCAzure Functions in Action #OrlandoCC
Azure Functions in Action #OrlandoCC
 
Era of server less computing
Era of server less computingEra of server less computing
Era of server less computing
 
Era of server less computing final
Era of server less computing finalEra of server less computing final
Era of server less computing final
 
Steps to publish an application to azure service fabric
Steps to publish an application to azure service fabricSteps to publish an application to azure service fabric
Steps to publish an application to azure service fabric
 
Azure service fabric overview
Azure service fabric overviewAzure service fabric overview
Azure service fabric overview
 
Certificate
CertificateCertificate
Certificate
 

Recently uploaded

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Recently uploaded (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Native Script Atlanta Code Camp

  • 1. Native Script – What you need to be Aware
  • 2. Agenda • Overview of Native Script • Pre-Requisites for Native Script • Native Script App Folders • Basic Commands of Native Script • Native Script Controls • Demo using Native Script –Play Ground
  • 3. My Intro • Baskar Rao • Senior .Net Consultant with Compunnel Software Group. • @baskarmib • https://www.linkedin.com/in/baskarrao-dandlamudi • baskarrao.dandlamudi@outlook.com • www.compunnel.com • https://github.com/baskar3078
  • 4. Native Script - Overview • Native Script is free open source framework for building native IOS and Android Apps. • Build Cross Platform mobile apps using single code base. • Develop Mobile Apps using JavaScript , Angular , Typescript and Vue
  • 5. Why Native Script • Web Developers with knowledge of HTML, CSS and JavaScript can use the same to develop rich native mobile applications. • Easily develop apps using existing plugins from npm [Node], Gradle [Android] and IOS Plugins. • Easy to learn and develop apps using pre- defined templates.
  • 6. Pre-Requisites of Native Script • Prior Knowledge of HTML, CSS and any one of scripting language JavaScript , Angular, Typescript or Vue • Node.js Server, Command Line Terminal and Preferred Text IDE Editor • Android Studio, Android SDK and Android Emulator, Java SDK
  • 7. Native Script – App Structure
  • 8. Native Script App Structure • Any Native Script app contains the below folders • Root – Project Name • App Folder • Node_Modules • Package.Json • Platforms
  • 9. App Structure • App Folder This folder contains all the development resources like forms, js files • Node_Modules This folder contains application npm module dependencies. The tns-core modules folder contains Native Script related javascript modules which can be used to develop features in the application like http calls, access files etc. • Package.Json Details of application and the version of native script used and other npm modules used in the application. • Platforms This folder contains platform-specific code which Native Script needs to build IOS or Android Apps. This is mostly generated code by Native Script CLI.
  • 10. App Structure - Contd • App_Resources This folder contains platform specific resources. • Shared This folder contains files that needs to be shared across views In app. • Views This folder contains the code to build apps views. Each view is made Up of XML File, a Javascript file and optional css file. • App.css File contains global styles used in the app. • App.Js This file sets up applications starting module and initializes the app.
  • 11. Native Script CLI Basic Commands • tns create appname --template template name The above command is used to create a native script app using Native Script CLI. • tns build android This command is used to build nativescript app using android platform • tns build ios This command is used to build nativescript app using ios platform • tns run android --emulator This command is used to build and deploy your app using android emulator IOS related commands cannot be run in Windows OS. They can be used only in Mac.
  • 13. What makes a Native Script View • Native Script View is comprised of three files. -- ViewName.xml -- ViewName.css -- ViewName.js • Xml file is used to design the screen layout and screen controls. • Css file is used to mention css class specific to the view. • Js file acts as the code behind file similar to aspx.cs for an aspx page.
  • 14. Native Script View Models • Native Script View Models are used to enable two way data flow between model and view • Native Script uses the observable module to facilitate the binding between view and model var observableModule = require("data/observable"); • The properties defined in view model can be accessed in view using the “{{ propertyname }}” syntax <TextField id="email" text="{{ email }}" keyboardType="email" autocorrect="false" autocapitalizationType="none" />
  • 15. Native Script Basic Controls HTML Control Native Script Control <div> LayOut – Stack Layout, Grid LayOut, Wrap LayOut, FlexBox Layout, Dock Layout <input type="button" value=“Sign In" onclick=“signIn()"> <Button text=“Sign In" tap="signIn"/> <label>Click me </label> <Label text="{{ name }}" /> <img src="mdn-logo-sm.png" alt="MDN"> <Image src="res://logo" ></Image> <input id="email" type="email"> <TextField id="email" text="{{ email }}" keyboardType="email" autocorrect="false“ autocapitalizationType="none" />
  • 16. Native Script Basic Controls TextField <TextField id="email" text="{{ email }}" keyboardType="email" autocorrect="false“ autocapitalizationType="none" /> • Id – Used to define a unique identifier for the property • Text – Used to define the text which is binded to the TextField. Use of {{ }} binds it property in viewModel. • keyboardType – This is used to determine the keyboard layout. Email is used for email fields and Secure is used for password fields. Label <Label text="{{ name }}" horizontalAlignment="left" verticalAlignment="center"/> • Text – Used to define the text which is binded to the Label. Use of {{ }} binds it property in viewModel.
  • 17. Native Script Basic Controls Image <Image src="res://logo" stretch="none" horizontalAlignment="center" ></Image> • Src field is used to load the image from resources. Native script makes sure load the appropriate image from android platform for android and ios platform for ios. Button <Button text="Sign in" tap="signIn"/> • Tap Property is used to mention the code behind which needs to be executed on click of the Button.
  • 18. Dev Tools • Visual Studio Code Native Script extension can be used to develop and debug NativeScript Applications. Create a native script app using tns create app command. Navigate to the app folder. Enter code . Command . • Chrome Developer Tools Chrome Developer Tools can also be used to debug NativeScript Applications.
  • 19. Dev Tools • Native Script Play Ground Native Script Play Ground is a browser based platform to develop and preview mobile applications
  • 20. Dev Tools • Native Script Side Kick Can be used to develop applications with pre-defined starter templates Perform cloud or local builds and deploy to test devices Helps to develop IOS Applications on Windows O/S
  • 21. Walkthrough • Demo of an existing app using Play Ground • Demo live sync feature • Demo how to make API calls using Fetch Module. The app used in the demo is from Native Script tutorial
  • 22. Further Resources • Native Script - Documentation • Native Script eBook is free book by @brosteins available for download • Native Script Blog • Native Script Code Snippets • Native Script Playground - Browser based development tool • Native Script Sidekick – Useful for developing IOS apps on Windows Machine