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
90
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
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
140
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
180
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
330
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
190
nekko cloudにおけるProxmox VE利用事例
irumaru
3
430
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Producing Creativity
orderedlist
PRO
341
39k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
How GitHub (no longer) Works
holman
311
140k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
RailsConf 2023
tenderlove
29
940
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!