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
110
Other Decks in Programming
See All in Programming
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
320
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
140
Navigating Dependency Injection with Metro
zacsweers
3
260
FindyにおけるTakumi活用と脆弱性管理のこれから
rvirus0817
0
500
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
300
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.2k
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
120
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
3
170
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
680
Cache Me If You Can
ryunen344
2
690
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
840
We Have a Design System, Now What?
morganepeng
53
7.8k
Designing Experiences People Love
moore
142
24k
How GitHub (no longer) Works
holman
315
140k
Into the Great Unknown - MozCon
thekraken
40
2k
Scaling GitHub
holman
463
140k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Facilitating Awesome Meetings
lara
55
6.5k
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?