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
91
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
Rails アプリ地図考 Flush Cut
makicamel
1
120
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
730
Rubyで始める関数型ドメインモデリング
shogo_tksk
0
110
Unity Android XR入門
sakutama_11
0
160
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
160
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
170
Conform を推す - Advocating for Conform
mizoguchicoji
3
690
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
750
CI改善もDatadogとともに
taumu
0
120
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
6
4k
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
210
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
0
200
Featured
See All Featured
How GitHub (no longer) Works
holman
314
140k
Site-Speed That Sticks
csswizardry
4
380
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Rails Girls Zürich Keynote
gr2m
94
13k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
410
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
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!