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
Introduction to Firebase
Search
Igor Flysta
August 19, 2015
Programming
1
95
Introduction to Firebase
Presentation of Firebase - realtime No-SQL database and hosting solution for mobile app.
Igor Flysta
August 19, 2015
Tweet
Share
Other Decks in Programming
See All in Programming
株式会社 Sun terras カンパニーデック
sunterras
0
190
Reduxモダナイズ 〜コードのモダン化を通して、将来のライブラリ移行に備える〜
pvcresin
2
670
dynamic!
moro
9
5.6k
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
2.8k
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
1
730
Back to the Future: Let me tell you about the ACP protocol
terhechte
0
120
高度なUI/UXこそHotwireで作ろう Kaigi on Rails 2025
naofumi
4
3.1k
CSC305 Lecture 01
javiergs
PRO
1
380
CSC305 Lecture 04
javiergs
PRO
0
230
CI_CD「健康診断」のススメ。現場でのボトルネック特定から、健康診断を通じた組織的な改善手法
teamlab
PRO
0
160
Breaking Up with Big ViewModels — Without Breaking Your Architecture (droidcon Berlin 2025)
steliosf
PRO
1
290
私達はmodernize packageに夢を見るか feat. go/analysis, go/ast / Go Conference 2025
kaorumuta
2
460
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
54
3k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Designing for humans not robots
tammielis
254
25k
How to Think Like a Performance Engineer
csswizardry
27
2k
Bash Introduction
62gerente
615
210k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
A Tale of Four Properties
chriscoyier
160
23k
The Cult of Friendly URLs
andyhume
79
6.6k
GraphQLとの向き合い方2022年版
quramy
49
14k
Become a Pro
speakerdeck
PRO
29
5.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.7k
Transcript
Introduction to
Realtime Backend for your App
None
The Full Stack Creating an app requires managing complex infrastructure.
But the full stack is never that simple
… and neither is the client side Clients: • Web
• iOS • Android
… the truth is The users don’t care about your
backend
The User Expects • Speed • Offline • Multi-platform •
Simple Autentification
Firebase Backend
And forget the server Firebase apps can run on client-side
code only
REALTIME DATABASE • NoSQL JSON data-store • Cross-platform client-side SDKs
• Offline out-of-the-box • Auto-scaling • RESTful API
None
REALTIME DATA Whenever data is updated in Firebase, it sends
the update down to every listening client
None
Cross-platform
Storing Data Firebase ref = new Firebase(“https://<your-firebase-app>.firebaseio.com/message”); ref.setValue(“All the things”);
Storing Data { “location”: { “city”: “Ternopil”, “country”: “Ukraine” }
}
Sync Data Firebase ref = new Firebase (“https://<your-firebase-app>.firebaseio.com/message”); ref.addValueEventListener(new ValueEventListener()
{ @Override public void onDataChange(DataSnapshop snapshot) { System.out.println(snapshot.getValue()); } @Override public void onCancelled(FirebaseError error) { } });
{ "messages": { "message1": { "text": "Hello, world", "country": "USA"
}, "message2": { "text": "Bonjour monde", "country": "France" }, "message3": { "text": "Hello, world", "country": "England" }, "message4": { "text": "你好世界", "country": "China" }, "message5": { "text": "γειά σου κόσμος", "country": "Greece" }, ... } }
Offline
Intermittent Offline What happens when you go through a tunnel?
Firebase clients store a local cache of your data. When the user goes offline, the app still works as expected with the local cache.
Extended Offline What happens when you go on a flight?
On mobile, Firebase persists data to a local store. The app will continue to work even across app restarts.
One Line Of Code Firebase.getDefaultConfig().setPersistenceEnabled(true);
Autentification • Email & Password • Google • Twitter •
Facebook • Github • Anonymous • Custom
Autentification ref.authWithOAuthToken("google", "<OAuth Token>", new Firebase. AuthResultHandler() { @Override public
void onAuthenticated(AuthData authData) { // the Google user is now authenticated with your Firebase app } @Override public void onAuthenticationError(FirebaseError firebaseError) { // there was an error } });
Security • Declarative rules language • JavaScript-like syntax • Executed
server-side • Authorization • Schema validation
Security By default everyone can write and read { "rules":
{ ".read": true, ".write": true, } }
Security Everyone can read, but no one can write {
"rules": { ".read": true, ".write": false, } }
Security Secure specific parts of your Firebase { "rules": {
".read": true, "message": { ".write": false } } }
Security Special variables to power autentification { "rules": { ".read":
true, "message": { ".write": "auth !== null", ".validate": "newData.isString() && newData.val().length < 100" } } }
User-based Security Use $wildcards as route parameters { "rules": {
".read": false, ".write": false, "users": { "$userid": { ".read": "true", ".write": "auth.uid === $userid" } } } }
Hosting • Free static asset hosting • SSL certificate •
Global CDN • Single command deploys • One-click rollbacks • Custom domains
Hosting Demo
And More ... • Angular, React, Ember, Backbone bindings •
GeoFire (realtime geolocation) • Firepad (realtime text editing) • Open Data Sets • More coming soon...
Let’s Code
Thank You!