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
120
0
Share
Nativescript - Building truly native apps with Javascript
Márcio Vicente
October 08, 2016
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
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1k
Explore CoroutineScope
tomoeng11
0
170
tRPCの概要と少しだけパフォーマンス
misoton665
2
270
GoogleCloudとterraform完全に理解した
terisuke
1
190
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
140
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.6k
空間オーディオの活用
objectiveaudio
0
140
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
320
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
180
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
Making the RBS Parser Faster
soutaro
0
670
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Unsuck your backbone
ammeep
672
58k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Ruling the World: When Life Gets Gamed
codingconduct
0
220
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
360
Prompt Engineering for Job Search
mfonobong
0
300
Embracing the Ebb and Flow
colly
88
5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
190
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
The Curse of the Amulet
leimatthew05
1
12k
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?