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
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
ThorVG Viewer In VS Code
nors
0
760
MUSUBIXとは
nahisaho
0
130
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.8k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
6k
CSC307 Lecture 02
javiergs
PRO
1
770
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
650
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
2026年 エンジニアリング自己学習法
yumechi
0
130
Fluid Templating in TYPO3 14
s2b
0
130
SourceGeneratorのススメ
htkym
0
190
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Are puppies a ranking factor?
jonoalderson
1
2.7k
Writing Fast Ruby
sferik
630
62k
From π to Pie charts
rasagy
0
120
Building the Perfect Custom Keyboard
takai
2
680
Scaling GitHub
holman
464
140k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
930
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
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?