Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Nativescript - Building truly native apps with ...
Search
Márcio Vicente
October 08, 2016
Programming
0
120
Nativescript - Building truly native apps with Javascript
Márcio Vicente
October 08, 2016
Tweet
Share
More Decks by Márcio Vicente
See All by Márcio Vicente
Nativescript - Front in Maceió
marciovicente
0
100
Other Decks in Programming
See All in Programming
ReadMoreTextView
fornewid
1
480
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
110
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
130
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
150
童醫院敏捷轉型的實踐經驗
cclai999
0
190
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
100
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
110
Cursor AI Agentと伴走する アプリケーションの高速リプレイス
daisuketakeda
1
130
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
1
450
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
370
Java on Azure で LangGraph!
kohei3110
0
170
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
260
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
17
940
Git: the NoSQL Database
bkeepers
PRO
430
65k
Into the Great Unknown - MozCon
thekraken
39
1.9k
Navigating Team Friction
lara
187
15k
VelocityConf: Rendering Performance Case Studies
addyosmani
330
24k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Rails Girls Zürich Keynote
gr2m
94
14k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Scaling GitHub
holman
459
140k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Transcript
NativeScript Building truly native mobile apps with javascript
None
} $ whoami Co-founder Software Developer Márcio Vicente marciovicente
} The problem Native UX Native APIs Web Easy to
learn Reuse Code (desktop/mobile) Hybrid
} What is NativeScript? What is NativeScript? "An open source
framework for building truly native mobile apps with JavaScript. Use web skills, like TypeScript, Angular and CSS, and get native UI and performance on iOS and Android"
Cordova Plugins > Behind the scenes >
Not like Hybrid Apps There’s no DOM to manipulate or
style No WebView }
Not like React Native Unlimited API Faster }
Not like Xamarin No cross-compile No bindings required to access
native APIs }
Stack } or/and or/and 2
Architectural pattern No more MVC M V VM Model View
View-Model Data logic UI Application Logic }
Layout system } Absolute Dock Grid Stack Wrap
Extensible } Plugins
Full access to Android and iOS APIs
} //Accessing Native APIs
}
None
J V M Javascript Virtual Machine JavaScriptCore V8
JVM } Foo() _Foo() C++ JNI JAVA OBJ-C
} UI Components
}
}
}
} Custom components
} // app/components/buttons/flat.xml <button>{{ label }}</button> // app/main.xml
<Page xmlns:buttons=“components/buttons“> <buttons:flat label=“{{ btnLabel }}” /> </Page> // Custom components
} // app/page.ts @Component({ selector: ‘flat-btn', template: ‘<button class="flat">{{label}}</button>’ });
// app/page.html <flat-btn label=“Submit”></flat-btn> Custom components
} Wrappers
} //Importing wrappers
} Create your own NS module
} //Custom NS plugins // custom-plugins/device.ios.js module.exports = { version:
UIDevice.currentDevice().systemVersion } // custom-plugins/device.android.js module.exports = { version: Build.VERSION.RELEASE } // app.js import device from ‘./custom-plugins/device’; console.log(device.version);
} Same codebase
} //Same codebase <Button ios:text=“Submit" android:text=“Send" /> // from attributes
if (page.ios) { new UiAlertDialog().show('text'); } else { new CustomJavaDialog('text'); } // from JS
There’s no silver bullet
} Get started $ npm install -g nativescript $
tns create my-app $ tns platform add ios $ tns build ios $ tns livesync ios --emulator --watch
} Some tips • Use VS Code (+ NS extension)
• Create from template • nativescript.rocks
} THX! Questions?