SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
Firebase
For the Web
Jana Moudrá @Janamou +JanaMoudra
Co-Founder at
Organizer at GDG Prague
Google Developer Expert for
About me
Jana Moudrá @Janamou +JanaMoudra
#firebasehackprague
FIREBASE?
#firebasehackprague
#firebasehackprague
#firebasehackprague
#firebasehackprague
LET’S START
1. Login to Firebase console
2. Create a new project
3. Copy the code to your project
4. Use Firebase
#firebasehackprague
Firebase How To
$ npm install -g firebase-tools
$ firebase login
$ firebase serve
firebase.google.com/docs/cli/
Firebase Tools
#firebasehackprague
Firebase For the Web
You may include every
component independently
#firebasehackprague
Firebase For the Web
<script src="firebase.js"></script>
or
<script src="firebase-app.js"></script>
<script src="firebase-auth.js"></script>
<script src="firebase-database.js"></script>
<script src="firebase-storage.js"></script>
#firebasehackprague
Firebase For the Web
var firebase = require('firebase/app');
require('firebase/auth');
require('firebase/database');
require('firebase/storage);
npmjs.com/package/firebase
Firebase For the Web
E-mail/Password
Providers
Google, Facebook, Twitter, Github
Anonymous
Custom auth system integration
Needs to be enabled in Firebase console
#firebasehackprague
Auth
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
// Get data from user
} else {
// User is signed out
}
});
#firebasehackprague
Auth
// User can be null
var user = firebase.auth().currentUser;
#firebasehackprague
Auth
// Create a new account
firebase.auth()
.createUserWithEmailAndPassword(email, password);
// Login
firebase.auth()
.signInWithEmailAndPassword(email, password);
#firebasehackprague
Auth
// Can be Google, Facebook, Twitter or Github
var provider =
new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithPopup(provider);
firebase.google.com/docs/auth/web/manage-users
Auth
Cloud hosted storage
Data is stored as JSON
Realtime synchronization
Automatic updates
Offline support
#firebasehackprague
Database
Asynchronous listening to events:
value
child_added
child_changed
child_removed
child_moved
#firebasehackprague
Database - Retrieve
firebase.database().ref('users')
.on('value', function(snapshot) {
doSomethingWithData(snapshot.val());
});
#firebasehackprague
Database - Retrieve
firebase.database().ref('users')
.once('value', function(snapshot) {
doSomethingWithData(snapshot.val());
});
#firebasehackprague
Database - Retrieve
// Orders by child
firebase.database().ref('users')
.orderByChild('age');
// Limits to first 5
firebase.database().ref('users')
.limitToFirst(5);
#firebasehackprague
Database - Sort, Filter
#firebasehackprague
Database - Save
Methods:
set()
push()
update()
transaction()
firebase.database().ref('messages')
.push({text: 'Ahoj'});
firebase.google.com/docs/database/web/start
Database - Save
firebase.google.com/docs/database/security/
Rules
Read and write access to db/storage
How data are structured
What indexes exist
From Firebase console
firebase.google.com/docs/storage/web/start
Storage
Backed by Google Cloud Storage
Files stored in Firebase storage bucket
For Chrome and Chrome
apps/extensions
firebase.google.com/docs/cloud-messaging/chrome/client
Cloud Messaging
#firebasehackprague
Hosting
Static hosting for web apps
firebaseapp.com subdomain
Firebase CLI needed
$ firebase init
$ firebase deploy
#firebasehackprague
MORE INFO?
firebase.google.com/docs/reference/
codelabs.developers.google.com/codelabs/firebase-web/index.html
firebase.google.com/docs/samples/
firebase.google.com/docs/libraries/
#firebasehackprague
HAPPY CODING!
Firebase
For the Web
Jana Moudrá @Janamou +JanaMoudra

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Polymer and Firebase: Componentizing the Web in Realtime
Polymer and Firebase: Componentizing the Web in RealtimePolymer and Firebase: Componentizing the Web in Realtime
Polymer and Firebase: Componentizing the Web in Realtime
 
Android - Getting Started With Firebase Auth
Android - Getting Started With Firebase AuthAndroid - Getting Started With Firebase Auth
Android - Getting Started With Firebase Auth
 
Build Collaborative App Using Polymer and Firebase
Build Collaborative App Using Polymer and FirebaseBuild Collaborative App Using Polymer and Firebase
Build Collaborative App Using Polymer and Firebase
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
Automating Google Lighthouse
Automating Google LighthouseAutomating Google Lighthouse
Automating Google Lighthouse
 
What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017
 
SydJS.com
SydJS.comSydJS.com
SydJS.com
 
Get Hip with Java Hipster - JavaOne 2017
Get Hip with Java Hipster - JavaOne 2017Get Hip with Java Hipster - JavaOne 2017
Get Hip with Java Hipster - JavaOne 2017
 
Front Ends for Back End Developers - Spring I/O 2017
Front Ends for Back End Developers - Spring I/O 2017Front Ends for Back End Developers - Spring I/O 2017
Front Ends for Back End Developers - Spring I/O 2017
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017
 Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017 Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017
Develop Hip APIs and Apps with Spring Boot and Angular - Connect.Tech 2017
 
Front End Development for Back End Java Developers - NYJavaSIG 2019
Front End Development for Back End Java Developers - NYJavaSIG 2019Front End Development for Back End Java Developers - NYJavaSIG 2019
Front End Development for Back End Java Developers - NYJavaSIG 2019
 
Fluent 2018: Measuring What Matters
Fluent 2018: Measuring What MattersFluent 2018: Measuring What Matters
Fluent 2018: Measuring What Matters
 
Play Framework on Google App Engine
Play Framework on Google App EnginePlay Framework on Google App Engine
Play Framework on Google App Engine
 
Front End Development for Back End Developers - Denver Startup Week 2017
Front End Development for Back End Developers - Denver Startup Week 2017Front End Development for Back End Developers - Denver Startup Week 2017
Front End Development for Back End Developers - Denver Startup Week 2017
 
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
 
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
 
Automated Duplicate Content Consolidation with Google Cloud Functions
Automated Duplicate Content Consolidation with Google Cloud FunctionsAutomated Duplicate Content Consolidation with Google Cloud Functions
Automated Duplicate Content Consolidation with Google Cloud Functions
 
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
 
Understanding meteor
Understanding meteorUnderstanding meteor
Understanding meteor
 

Ähnlich wie Firebase for the Web

Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your plugin
Marko Heijnen
 

Ähnlich wie Firebase for the Web (20)

Building with Firebase
Building with FirebaseBuilding with Firebase
Building with Firebase
 
Google IO Extended 2018 Codelabs - Google Developer Philippines
Google IO Extended 2018 Codelabs - Google Developer Philippines Google IO Extended 2018 Codelabs - Google Developer Philippines
Google IO Extended 2018 Codelabs - Google Developer Philippines
 
Firebasics
FirebasicsFirebasics
Firebasics
 
Deploy a PHP App on Google App Engine
Deploy a PHP App on Google App EngineDeploy a PHP App on Google App Engine
Deploy a PHP App on Google App Engine
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your plugin
 
Generic-resume
Generic-resumeGeneric-resume
Generic-resume
 
JLPDevs - Optimization Tooling for Modern Web App Development
JLPDevs - Optimization Tooling for Modern Web App DevelopmentJLPDevs - Optimization Tooling for Modern Web App Development
JLPDevs - Optimization Tooling for Modern Web App Development
 
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
 
Introduction to development with Django web framework
Introduction to development with Django web frameworkIntroduction to development with Django web framework
Introduction to development with Django web framework
 
Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 MinutesUsing Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
 
D'oh! Avoid annoyances with Grunt.
D'oh! Avoid annoyances with Grunt.D'oh! Avoid annoyances with Grunt.
D'oh! Avoid annoyances with Grunt.
 
How We Build NG-MY Websites: Performance, SEO, CI, CD (Thai version)
How We Build NG-MY Websites: Performance, SEO, CI, CD (Thai version)How We Build NG-MY Websites: Performance, SEO, CI, CD (Thai version)
How We Build NG-MY Websites: Performance, SEO, CI, CD (Thai version)
 
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
 
Building full-stack Node.js web apps with Visual Studio Code
Building full-stack Node.js web apps with Visual Studio CodeBuilding full-stack Node.js web apps with Visual Studio Code
Building full-stack Node.js web apps with Visual Studio Code
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute Workshop
 
Firebase presentation
Firebase presentationFirebase presentation
Firebase presentation
 
Firebase Codelab - 2018 Milano
Firebase Codelab - 2018 MilanoFirebase Codelab - 2018 Milano
Firebase Codelab - 2018 Milano
 
Desarrollo web backend: Spring Boot, MongoDB y Azure
Desarrollo web backend: Spring Boot, MongoDB y AzureDesarrollo web backend: Spring Boot, MongoDB y Azure
Desarrollo web backend: Spring Boot, MongoDB y Azure
 

Mehr von Jana Moudrá

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

Mehr von Jana Moudrá (11)

How AngularDart & Firebase did an App together
How AngularDart & Firebase did an App togetherHow AngularDart & Firebase did an App together
How AngularDart & Firebase did an App together
 
How to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 minsHow to build a Dart and Firebase app in 30 mins
How to build a Dart and Firebase app in 30 mins
 
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
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Firebase for the Web