SlideShare a Scribd company logo
[DevDay2018] Ignite your app development with native script and firebase - By Hieu Lam, Software Engineer at Axon Active Viet Nam
Agile Offshore Software
Development & Testing company
Lam Phuc Hieu
phuchieuct
hieu.lam@axonactive.com
www.axon.vnfb.com/AxonActiveVietNam
Ignite your app development with
NativeScript and Firebase
www.axon.vnfb.com/AxonActiveVietNam
Agenda
• Introduce NativeScript
• Introduce Firebase
• Live demo
• Q&A
www.axon.vnfb.com/AxonActiveVietNam
NativeScript
www.axon.vnfb.com/AxonActiveVietNam
www.axon.vnfb.com/AxonActiveVietNam
Web App & Hydrid App
www.axon.vnfb.com/AxonActiveVietNam
What is NativeScript
• Open source framework
• Use JavaScript (“web skills”)
• Create truly native mobile apps for iOS, Android
• Write once, run everywhere
• Integrates deeply with Angular and TypeScript
www.axon.vnfb.com/AxonActiveVietNam
Firebase
www.axon.vnfb.com/AxonActiveVietNam
Problems
What people think Reality
www.axon.vnfb.com/AxonActiveVietNam
Solution
www.axon.vnfb.com/AxonActiveVietNam
 Setup server
 Setup database
 Create data table
 Write SQL queries
 Expose API via RESTFUL
 Create HTTP requests to call API
 Use socket to update data in real time
Firebase
www.axon.vn www.fb.com/AxonActiveVietnam
www.axon.vnfb.com/AxonActiveVietNam
Authentication
www.axon.vnfb.com/AxonActiveVietNam
Authentication
www.axon.vnfb.com/AxonActiveVietNam
Cloud Firestore
www.axon.vnfb.com/AxonActiveVietNam
Cloud Firestore
www.axon.vnfb.com/AxonActiveVietNam
Chat Application
Live demo
www.axon.vnfb.com/AxonActiveVietNam
Result
www.axon.vnfb.com/AxonActiveVietNam
• Install Node.js
• Setup Android Environment (SDK)/ iOS environment (Xcode)
Installation
C:>npm install nativescript –g
C:>tns create DevdayDaNang –template nativescript-template-ng-tutorial
C:DevdayDaNang>tns run android/ios
www.axon.vnfb.com/AxonActiveVietNam
• Setup firebase project in firebase.google.com
• Download config files:
 Android: google-services.json
 iOS: GoogleService-Info.plist
Installation
www.axon.vnfb.com/AxonActiveVietNam
Login page
import * as firebase from "nativescript-plugin-firebase“
www.axon.vnfb.com/AxonActiveVietNam
Firebase collection:
Chat page
chatCollection = firebase.firestore().collection(“chats");
Listen data changes: chatCollection.onSnapshot(<callback>)
Get data: chatCollection.get()
Add, edit, delete data: chatCollection.add(<new_document>)
chatCollection.doc(<document_id>).update(<new_documen
chatCollection.doc(<document_id>).delete()
www.axon.vnfb.com/AxonActiveVietNam
www.axon.vn www.fb.com/AxonActiveVietnam

More Related Content

PDF
The Thick Front-End
PPTX
Mobile Fest 2018. Илья Иванов. Как React-Native перевернул наше представление...
PDF
I knew there had to be a better way to build mobile apps
KEY
Test+video+upload
PDF
Polymer and Firebase: Componentizing the Web in Realtime
PPTX
Tutorial spot-cloud
PPTX
SharePoint Fest Chicago 2017 - SharePoint Framework, Angular & Azure Functions
PPTX
Why front-end matters in 2019
The Thick Front-End
Mobile Fest 2018. Илья Иванов. Как React-Native перевернул наше представление...
I knew there had to be a better way to build mobile apps
Test+video+upload
Polymer and Firebase: Componentizing the Web in Realtime
Tutorial spot-cloud
SharePoint Fest Chicago 2017 - SharePoint Framework, Angular & Azure Functions
Why front-end matters in 2019

What's hot (17)

PDF
Cross Platform Mobile Development
PDF
Firebase Adventures - Going above and beyond in Realtime
PPTX
Super tools to boost productivity in React dev env!
PDF
Serverless Empowering people
PDF
Building a Headless Shop
PPTX
Centric - PWA WebCast
PDF
Automating PhoneGap Build
PPTX
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
PPTX
Build Nodejs APIs using Serverless
PPTX
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
PDF
OSGi Web Development in Action
PDF
Building mobile apps with PhoneGap and Backbone
PDF
Progressive Web Apps. What, why and how
PDF
Protostrap
PDF
Cloud based mobile app development cit 2017
PPTX
Firebase.pptx
PPTX
Firebase.pptx
Cross Platform Mobile Development
Firebase Adventures - Going above and beyond in Realtime
Super tools to boost productivity in React dev env!
Serverless Empowering people
Building a Headless Shop
Centric - PWA WebCast
Automating PhoneGap Build
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
Build Nodejs APIs using Serverless
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
OSGi Web Development in Action
Building mobile apps with PhoneGap and Backbone
Progressive Web Apps. What, why and how
Protostrap
Cloud based mobile app development cit 2017
Firebase.pptx
Firebase.pptx
Ad

Similar to [DevDay2018] Ignite your app development with native script and firebase - By Hieu Lam, Software Engineer at Axon Active Viet Nam (20)

PPTX
React native starter
PPTX
Ionic and Azure
PPTX
NativeScript - Open source framework for building truly native mobile apps wi...
PDF
Connect.js 2015 - Building Native Mobile Applications with Javascript
PPTX
Prototyping Mobile Apps with NativeScript and Angular
PDF
Your choices for building a mobile app in 2016
PDF
«I knew there had to be a better way to build mobile app»​
PPTX
Xamarin.Forms Bootcamp
PPTX
Hybrid mobile application with Ionic
PPTX
2013.02.26 Intel Overview
PPTX
Kickstart android development with xamarin
PDF
React Native - DILo Surabaya
PPTX
Cross-platform Mobile Development on Open Source
PDF
Hybrid app development with ionic
PDF
移动端Web app开发
PPTX
WappZapp Pitch Node JS Meetup
PDF
Ionic: The Web SDK for Develop Mobile Apps.
PDF
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
PPTX
Running Web & Mobile in Azure App Service
PDF
Ionic adventures - Hybrid Mobile App Development rocks
React native starter
Ionic and Azure
NativeScript - Open source framework for building truly native mobile apps wi...
Connect.js 2015 - Building Native Mobile Applications with Javascript
Prototyping Mobile Apps with NativeScript and Angular
Your choices for building a mobile app in 2016
«I knew there had to be a better way to build mobile app»​
Xamarin.Forms Bootcamp
Hybrid mobile application with Ionic
2013.02.26 Intel Overview
Kickstart android development with xamarin
React Native - DILo Surabaya
Cross-platform Mobile Development on Open Source
Hybrid app development with ionic
移动端Web app开发
WappZapp Pitch Node JS Meetup
Ionic: The Web SDK for Develop Mobile Apps.
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
Running Web & Mobile in Azure App Service
Ionic adventures - Hybrid Mobile App Development rocks
Ad

More from DevDay Da Nang (20)

PDF
[DevDay2019] Lean UX - By Bryant Castro, Bryant Castro at Wizeline
PPT
[DevDay2019] Why you'll lose without UX Design - By Szilard Toth, CTO at e·pi...
PDF
[DevDay2019] Things i wish I knew when I was a 23-year-old Developer - By Chr...
PDF
[DevDay2019] Designing design teams - Christopher Nguyen, UX Manager at Wizeline
PDF
[DevDay2019] Growth Hacking - How to double the benefits of your startup with...
PDF
[DevDay2019] Collaborate or die: The designers’ guide to working with develop...
PPTX
[DevDay2019] How AI is changing the future of Software Testing? - By Vui Nguy...
PPTX
[DevDay2019] Hands-on Machine Learning on Google Cloud Platform - By Thanh Le...
PPTX
[DevDay2019] Micro Frontends Architecture - By Thang Pham, Senior Software En...
PPTX
[DevDay2019] Power of Test Automation and DevOps combination - One click savi...
PPTX
[DevDay2019] How do I test AI models? - By Minh Hoang, Senior QA Engineer at KMS
PPTX
[DevDay2019] How to quickly become a Senior Engineer - By Tran Anh Minh, CEO ...
PPTX
[Devday2019] Dev start-up - By Le Trung, Founder & CEO at Hifiveplus and Edu...
PDF
[DevDay2019] Web Development In 2019 - A Practical Guide - By Hoang Nhu Vinh,...
PDF
[DevDay2019] Opportunities and challenges for human resources during the digi...
PPTX
[DevDay2019] Python Machine Learning with Jupyter Notebook - By Nguyen Huu Th...
PPTX
[DevDay2019] Do you dockerize? Are your containers safe? - By Pham Hong Khanh...
PPTX
[DevDay2019] Develop a web application with Kubernetes - By Nguyen Xuan Phong...
PPTX
[DevDay2019] Paradigm shift towards effective Scrum - By Tam Doan, Agile Coac...
PDF
[DevDay2019] JAM Stack - By Ngo Thi Ni, Web Developer at Agility IO
[DevDay2019] Lean UX - By Bryant Castro, Bryant Castro at Wizeline
[DevDay2019] Why you'll lose without UX Design - By Szilard Toth, CTO at e·pi...
[DevDay2019] Things i wish I knew when I was a 23-year-old Developer - By Chr...
[DevDay2019] Designing design teams - Christopher Nguyen, UX Manager at Wizeline
[DevDay2019] Growth Hacking - How to double the benefits of your startup with...
[DevDay2019] Collaborate or die: The designers’ guide to working with develop...
[DevDay2019] How AI is changing the future of Software Testing? - By Vui Nguy...
[DevDay2019] Hands-on Machine Learning on Google Cloud Platform - By Thanh Le...
[DevDay2019] Micro Frontends Architecture - By Thang Pham, Senior Software En...
[DevDay2019] Power of Test Automation and DevOps combination - One click savi...
[DevDay2019] How do I test AI models? - By Minh Hoang, Senior QA Engineer at KMS
[DevDay2019] How to quickly become a Senior Engineer - By Tran Anh Minh, CEO ...
[Devday2019] Dev start-up - By Le Trung, Founder & CEO at Hifiveplus and Edu...
[DevDay2019] Web Development In 2019 - A Practical Guide - By Hoang Nhu Vinh,...
[DevDay2019] Opportunities and challenges for human resources during the digi...
[DevDay2019] Python Machine Learning with Jupyter Notebook - By Nguyen Huu Th...
[DevDay2019] Do you dockerize? Are your containers safe? - By Pham Hong Khanh...
[DevDay2019] Develop a web application with Kubernetes - By Nguyen Xuan Phong...
[DevDay2019] Paradigm shift towards effective Scrum - By Tam Doan, Agile Coac...
[DevDay2019] JAM Stack - By Ngo Thi Ni, Web Developer at Agility IO

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Approach and Philosophy of On baking technology
PPT
Teaching material agriculture food technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Empathic Computing: Creating Shared Understanding
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
A Presentation on Artificial Intelligence
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
Approach and Philosophy of On baking technology
Teaching material agriculture food technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Digital-Transformation-Roadmap-for-Companies.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Empathic Computing: Creating Shared Understanding
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
The AUB Centre for AI in Media Proposal.docx
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
A Presentation on Artificial Intelligence
Diabetes mellitus diagnosis method based random forest with bat algorithm
“AI and Expert System Decision Support & Business Intelligence Systems”

[DevDay2018] Ignite your app development with native script and firebase - By Hieu Lam, Software Engineer at Axon Active Viet Nam

Editor's Notes

  • #2: Chào mừng các bạn đến với ngày hội Devday 2018.
  • #4: Ở topic này, mình sẽ giới thiệu các bạn về cách sử dụng nativescript và firebase để xây dựng các ứng dụng mobile 1 cách nhanh chóng
  • #5: Phần trình bày của mình gồm 3 phần. đầu tiên mình sẽ nói về NativeScript, tiếp theo đó là Firebase, và cuối cùng là phần hấp dẫn nhất: mình sẽ livecode xây dựng 1 ứng dụng chat bằng nativeScript và firebase
  • #6: Bắt đầu với nativescript
  • #7: Trước khi t Như các bạn biết thì mỗi nền tảng mobile lại yêu cầu các ngôn ngữ lập trình khác nhau để xây dựng các ứng dụng native cho riêng nền tảng đó: Ios: Swift /Objective c Android: Java Window với nền tảng .Net Vậy có cách nào mình có thể sử dụng 1 ngôn ngữ để dev cho các nền tảng mobile khác nhau này. Câu trả lời là web application hoặc các ứng dụng dạng hydrid application. Nhưng cả 2 dạng application này đều có nhược điểm: Web application thì bị giới hạn các native api, tức có nghĩa là ứng dụng chỉ chạy được trong môi trường browser chứ không truy cập được sâu vào hệ thống CÒn hydrid thì limitation này đã bị phá bỏ khi ứng dụng web được xây dựng trong môi trường native nhưng performance lại là 1 vấn đề nan giải, do vẫn phải phụ thuộc vào webview nên không thể đạt được performace tốt Thấy được sự khó khan này, các kĩ sư của Telerik  đã phát triển nên Nativescript Vậy nativescript có những tính năng nào để tạo nên sự khác biệt
  • #9: Là 1 open source framework, giúp chúng ta có thể sử dụng các webskill để phát triển các ứng dụng mobile Điều đặc biệt ở đây là truly native, có nghĩa là các ứng dụng được phát triển bằng nativescript sẽ là những ứng dụng native thực thụ, không phụ thuộc vào webview và có performance không thua kém các ứng dụng native Các bạn cố thể sử dụng chung codebase để phát triển cho android và IOS : 90% code dung chung cho android và ios, 70% code dung chung với các ứng dụng web Nativescript có 1 kho plugin vô cùng phong phú, giúp các bạn thực hiện 1 số tác vụ cơ bản 1 cách dễ dàng Và điều quan trọng nhất và cũng là điều mình thích nhất ở Nativscript chính là việc support Angular vaf typescript. Trong trường hợp cacs bạn không biết thì angular là 1 frontent framework để phát triển các ứng dụng web cực kì phổ biến và đang hot hiện nay hiện nay và được phát triển bỏi google
  • #10: Tiếp đến mình sẽ nói về firebase
  • #11: Tưởng tượng bạn đang sử dụng 1 ứng dụng , lấy ví dụ như facebook. Những gì người ta thấy là ứng dụng này chỉ chạy trên đt 1 cách đơn giản. Nhưng thực tế, từ góc nhìn của 1 de, thì điều này không đơn giản chút nào. Đằng sau 1 úng dụng đơn giản là 1 hệ thống server đồ sộ để quản lý các việc: authen, database… Có thể có nhiều bạn đồng tình với mình là những việc này không hề đơn giản chút nào, có thể mất hằng tháng trời để setup những việc này trên server Như với firebase, bạn có thể quên đi những điều phức tạp nauy
  • #12: Firebase là 1 giải pháp giúp bạn đơn giản hóa các tác vụ cho phần backend. Firebase còn được gọi như là 1 BAAS: backend as a service
  • #13: Với firebase mình ko cần làm những việc này
  • #14: Firebase được chia làm 3 phần chính Không thể giói thiệu hết Chỉ authentication và realtime database
  • #15: Đầu tiên mình sẽ nói về phần authentication Firebase giúp bạn quản lý user 1 cách dễ dàng. Bao gồm đăng kí mới tài khoản, đăng nhập, quên password, gửi email để xác nhận tài khoản Thậm chí còn hỗ trọ login với các nhà hỗ trợ thứ 3 như login với facebook, google,twitter github
  • #16: Đầu tiên mình sẽ nói về phần authentication Firebase giúp bạn quản lý user 1 cách dễ dàng. Bao gồm đăng kí mới tài khoản, đăng nhập, quên password, gửi email để xác nhận tài khoản Thậm chí còn hỗ trọ login với các nhà hỗ trợ thứ 3 như login với facebook, google,twitter github
  • #17: Kế tiếp là 1 tính năng làm quan trọng bậc nhất của firebase là firestore. Firestore cho phép bạn lưu trữ data và đồng bộ data giữa các người dung và giữa các thiết bị với nhau sử dụng dạng CSDL NoSQL Đặc biệt hơn cả, firestore mang đến khả năng đồng bộ dữ liệu thời gian thực. Giúp ứng dụng được cập nhật thông tin mới nhất ngay khi thông tin bị thay đổi
  • #18: Kế tiếp là 1 tính năng làm quan trọng bậc nhất của firebase là firestore. Firestore cho phép bạn lưu trữ data và đồng bộ data giữa các người dung và giữa các thiết bị với nhau sử dụng dạng CSDL NoSQL Đặc biệt hơn cả, firestore mang đến khả năng đồng bộ dữ liệu thời gian thực. Giúp ứng dụng được cập nhật thông tin mới nhất ngay khi thông tin bị thay đổi
  • #19: Đã đến phần hấp dẫn nhất ngày hôm nay. Mình sẽ trực tiếp tạo 1 ứng dụng chat sử dụng nativescript và firebase. Để cho các bạn thấy sử dụng nativescript và firebase dễ dàng và hiệu quả đến mức nào
  • #20: Mình sẽ xem qua những tính năng mà mình sẽ chuẩn bị thực hiện 1 úng dụng chạy trên nền tảng android sử dụng firebase để đồng bộ data thời gian thực
  • #21: Các bước cài đặt nativescript
  • #22: Các bước cài đặt firebase
  • #23: Sử dụng firebase thông qua plugin nativescript-plugin-firebase
  • #24: Realtime databse firestore