SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
How to build
a Dart and Firebase app
in 30 mins
Jana Moudra @Janamou +JanaMoudra
Hi!
Co-Founder at
GDE for
Teacher
+ =
Makes me productive
I just sit and write the code
I know what’s happening
Me and ?
Makes me productive
I just sit and write the code
I know what’s happening
I can build great apps!
Me and ?
Great apps
need a backend!
Needed
Lots of implementation
Eh, backend?
Database File Upload User accounts
Anonymous user OAuth Hosting ...
Needed
Lots of implementation
Eh, backend?
Database File Upload User accounts
Anonymous user OAuth Hosting ...
For a simple app...
OMG,
backend!
... backend
without
implementing
BACKEND ...
???
What
can we do?
Hello Firebase!
Firebase
Realtime database
Authentication
Cloud storage
Hosting
...
+
firebase3 package
JS interop
Wrapper
Types
// Removes data at location
try {
await childRef.remove();
} catch (e) {
print("Error while deleting item, $e");
}
Futures
// When auth state changes
auth()
.onAuthStateChanged
.where((e) => e.user != null)
.listen((e) {
User u = e.user;
...
});
Streams
// Updates data in a transaction
await childRef.transaction((value) =>
newValue
);
Methods
// Updates data in a transaction
await childRef.transaction((value) =>
newValue
);
Methods
No allowInterop()
DEMO
HOW to build
an app like this?
import 'package:firebase3/firebase.dart';
Import Firebase3!
Realtime database
Authentication
Cloud storage
Hosting
+
Realtime database?
{
"notes" : {
"-KUsbAq6445-ynO4lg6Z" : {
"img_url" : "https://firebasestorage.googlea...",
"text" : "Is awesome!",
"title" : "Dart"
},
...
}
}
Structure your data
databaseRef.onChildAdded.listen((e) {
DataSnapshot data = e.snapshot;
Map val = data.val();
Note note = new Note(val[jsonTagText]);
_showNote(note);
});
Load your data
try {
await databaseRef
.push({"text": "Hi"})
.future;
} catch (e) {
...
}
Save your data
Realtime database
in 15 minutes
Authentication?
var provider = new GoogleAuthProvider();
try {
await auth().signInWithPopup(provider);
} catch (e) {
...
}
Google provider
auth().currentUser
Current user
// Registers user with e-mail and password
await auth()
.createUserWithEmailAndPassword(
"jana.moudra@gmail.com",
"pass");
E-mail provider
Authentication
in 5 minutes
Cloud storage
File file = ...;
try {
UploadTaskSnapshot snapshot = await storageRef
.child(file.name)
.put(file)
.future;
_showUploadImage(snapshot.downloadURL);
} catch (e) {
...
}
Image upload
Cloud storage
in 10 minutes
+
pub.dartlang.org/packages/firebase3
github.com/Janamou/firebase3-dart
Where can I get it?
You can also
build an app like this
Jana Moudra @Janamou +JanaMoudra

Más contenido relacionado

La actualidad más candente

WSGI, Repoze, Deliverence
WSGI, Repoze, DeliverenceWSGI, Repoze, Deliverence
WSGI, Repoze, Deliverence
Quintagroup
 

La actualidad más candente (20)

Secure my ng-app
Secure my ng-appSecure my ng-app
Secure my ng-app
 
Play Framework on Google App Engine - Productivity Stack
Play Framework on Google App Engine - Productivity StackPlay Framework on Google App Engine - Productivity Stack
Play Framework on Google App Engine - Productivity Stack
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJSTek 2013 - Building Web Apps from a New Angle with AngularJS
Tek 2013 - Building Web Apps from a New Angle with AngularJS
 
Real World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker CachingReal World Lessons in Progressive Web Application & Service Worker Caching
Real World Lessons in Progressive Web Application & Service Worker Caching
 
Service Worker - Reliability bits
Service Worker - Reliability bitsService Worker - Reliability bits
Service Worker - Reliability bits
 
WSGI, Repoze, Deliverence
WSGI, Repoze, DeliverenceWSGI, Repoze, Deliverence
WSGI, Repoze, Deliverence
 
Launch Arguments & NSUserDefaults by Franck Lefebvre
Launch Arguments & NSUserDefaults by Franck LefebvreLaunch Arguments & NSUserDefaults by Franck Lefebvre
Launch Arguments & NSUserDefaults by Franck Lefebvre
 
Drive chrome(headless) with puppeteer
Drive chrome(headless) with puppeteerDrive chrome(headless) with puppeteer
Drive chrome(headless) with puppeteer
 
Yeoman
YeomanYeoman
Yeoman
 
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
 
Don't Over-React - just use Vue!
Don't Over-React - just use Vue!Don't Over-React - just use Vue!
Don't Over-React - just use Vue!
 
Firebase Basics - Dialog Demo for Group Tech Staff
Firebase Basics - Dialog Demo for Group Tech StaffFirebase Basics - Dialog Demo for Group Tech Staff
Firebase Basics - Dialog Demo for Group Tech Staff
 
Chrome enchanted 2015
Chrome enchanted 2015Chrome enchanted 2015
Chrome enchanted 2015
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017
 
Building the Front End with AngularJS
Building the Front End with AngularJSBuilding the Front End with AngularJS
Building the Front End with AngularJS
 
GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”
GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”
GlobalLogic Test Automation Online TechTalk “Playwright — A New Hope”
 
How We Build NG-MY Websites: Performance, SEO, CI, CD
How We Build NG-MY Websites: Performance, SEO, CI, CDHow We Build NG-MY Websites: Performance, SEO, CI, CD
How We Build NG-MY Websites: Performance, SEO, CI, CD
 
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
greach 2014 marco vermeulen bdd using cucumber jvm and groovygreach 2014 marco vermeulen bdd using cucumber jvm and groovy
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
 
Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!
 
Bring Your Web App to the Next Level. Wprowadzenie do Progressive Web App
Bring Your Web App to the Next Level. Wprowadzenie do Progressive Web AppBring Your Web App to the Next Level. Wprowadzenie do Progressive Web App
Bring Your Web App to the Next Level. Wprowadzenie do Progressive Web App
 

Similar a How to build a Dart and Firebase app in 30 mins

Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps Offline
Pedro Morais
 

Similar a How to build a Dart and Firebase app in 30 mins (20)

Firestore MENA digital days : GDG Abu dhabi
Firestore MENA digital days : GDG Abu dhabiFirestore MENA digital days : GDG Abu dhabi
Firestore MENA digital days : GDG Abu dhabi
 
Get started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePointGet started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePoint
 
Intro to Firebase Realtime Database and Authentication
Intro to Firebase Realtime Database and AuthenticationIntro to Firebase Realtime Database and Authentication
Intro to Firebase Realtime Database and Authentication
 
Firebase overview
Firebase overviewFirebase overview
Firebase overview
 
Building with Firebase
Building with FirebaseBuilding with Firebase
Building with Firebase
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
 
Firebase
Firebase Firebase
Firebase
 
Lecture 11 Firebase overview
Lecture 11 Firebase overviewLecture 11 Firebase overview
Lecture 11 Firebase overview
 
Firebase & SwiftUI Workshop
Firebase & SwiftUI WorkshopFirebase & SwiftUI Workshop
Firebase & SwiftUI Workshop
 
Firebase Code Lab - 2015 GDG Buffalo DevFest
Firebase Code Lab - 2015 GDG Buffalo DevFestFirebase Code Lab - 2015 GDG Buffalo DevFest
Firebase Code Lab - 2015 GDG Buffalo DevFest
 
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]
 
Developing advanced universal apps using html & js
Developing advanced universal apps using html & jsDeveloping advanced universal apps using html & js
Developing advanced universal apps using html & js
 
Intro to Firebase || Event by DSC UNIDEB
Intro to Firebase || Event by DSC UNIDEBIntro to Firebase || Event by DSC UNIDEB
Intro to Firebase || Event by DSC UNIDEB
 
HTML5 Introduction by Dhepthi L
HTML5 Introduction by Dhepthi LHTML5 Introduction by Dhepthi L
HTML5 Introduction by Dhepthi L
 
HTML5 for Rich User Experience
HTML5 for Rich User ExperienceHTML5 for Rich User Experience
HTML5 for Rich User Experience
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps Offline
 
PyCon India 2010 Building Scalable apps using appengine
PyCon India 2010 Building Scalable apps using appenginePyCon India 2010 Building Scalable apps using appengine
PyCon India 2010 Building Scalable apps using appengine
 
Firebasics
FirebasicsFirebasics
Firebasics
 
IndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web AppsIndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web Apps
 

Más de Jana Moudrá

Dart, Darrt, Darrrt
Dart, Darrt, DarrrtDart, Darrt, Darrrt
Dart, Darrt, Darrrt
Jana Moudrá
 

Más de Jana Moudrá (9)

Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Let's Play Dart
Let's Play DartLet's Play Dart
Let's Play Dart
 
How to bake an app in Dart and Polymer
How to bake an app in Dart and PolymerHow to bake an app in Dart and Polymer
How to bake an app in Dart and Polymer
 
Dart, Darrt, Darrrt
Dart, Darrt, DarrrtDart, Darrt, Darrrt
Dart, Darrt, Darrrt
 
Dart
DartDart
Dart
 
Android UI Testing with uiautomator
Android UI Testing with uiautomatorAndroid UI Testing with uiautomator
Android UI Testing with uiautomator
 
Bezpečnost platformy Android
Bezpečnost platformy AndroidBezpečnost platformy Android
Bezpečnost platformy Android
 
Introduction to the Dart language
Introduction to the Dart languageIntroduction to the Dart language
Introduction to the Dart language
 
Introduction to the Dart - Dart Flight School Liberec Hackathon
Introduction to the Dart - Dart Flight School Liberec Hackathon Introduction to the Dart - Dart Flight School Liberec Hackathon
Introduction to the Dart - Dart Flight School Liberec Hackathon
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

How to build a Dart and Firebase app in 30 mins