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
Introducción a Firebase
Search
Cristian Fabian Gómez Rojas
July 26, 2018
Technology
88
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introducción a Firebase
Cristian Fabian Gómez Rojas
July 26, 2018
More Decks by Cristian Fabian Gómez Rojas
See All by Cristian Fabian Gómez Rojas
Atomic Design Android
iyubinest
0
51
Rx UI
iyubinest
0
41
Código limpio en la UI para Android, mejores prácticas.
iyubinest
1
300
Código limpio en la UI para Android, mejores prácticas.
iyubinest
0
390
Other Decks in Technology
See All in Technology
コスト最適化の「めんどくさい」を AWS FinOps Agent でチョット楽にする
classmethod_kaz
0
210
AIに丸投げしないトイル削減 / Eliminating Toil Without Leaving It All to AI
kohbis
2
400
生成AI時代の クレデンシャルとパーミッション設計
nrinetcom
PRO
3
1.5k
[DroidKaigi 2026] Making UI specifications visible: Android UI development in the AI agent era supported by Compose Screenshot Testing and galleries
syarihu
0
570
Sigmaユーザーのための有用リソース一挙公開 & Sigmaで使えるMCP #sigma_ucj /useful-resources-for-sigma-computing-users-and-mcps-with-sigma
shinyaa31
0
100
プロダクト思考 × 基盤思考を AIで実現する Compound Engineering
tkc66buzz
1
270
AI時代に、プロダクトの数だけ積み上がる所有コストをどうエンジニアリングするか / Engineering the Cost of Ownership
kzkmaeda
0
1k
推論の観測、できていますか? 〜 Google Cloud Gemini Enterprise Agent Platformで 3つの Gemini モデルを実測して踏んだ、評価の罠 〜
shukob
PRO
0
150
Bet AI Day 2026丨How We Bet AI: AIとともに働く場をつくる
layerx
PRO
2
2.3k
PdMをやめて、 "プロダクトビルダー"という 働き方に変えました / PdM to Product Builder
shikichee
2
710
GuardDuty 検知対応を DevOps Agent で効率化しようとしている話 / GuardDuty Investigations with DevOps Agent
masahirokawahara
1
310
はじめてのDatabricks:技術者向けワークショップ / beginner-workshop
databricksjapan
PRO
0
160
Featured
See All Featured
A better future with KSS
kneath
240
18k
The Language of Interfaces
destraynor
162
27k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
230
Fireside Chat
paigeccino
42
4k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Code Review Best Practice
trishagee
74
20k
HDC tutorial
michielstock
2
850
Designing for Timeless Needs
cassininazir
1
470
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
490
Transcript
Introduccion a Firebase
Hola! Cristian Gomez Dev @GetPager. Encuentrame como @iyubinest 2
Agenda ▹ Que es Firebase ▹ Productos ▹ Cloud Storage
▹ Ejemplo 3
1. Que es Firebase
“ Firebase es una plataforma para el desarrollo de aplicaciones
web y aplicaciones móviles desarrollada por James Tamplin y Andrew Lee en 2011 y adquirida por Google en 2014. 5
Tu experiencia en cada plataforma Firebase permite llevar una experiencia
transversal a cada plataforma iOs, Android y la web. 6
▹ Cloud Firestore ▹ ML Kit ▹ Cloud Functions ▹
Authentications ▹ Hosting ▹ Cloud Storage ▹ Realtime DB ▹ Crashlytics ▹ Testlab ▹ etc... Productos 7
▹ Cloud Firestore ▹ ML Kit ▹ Cloud Functions ▹
Authentications ▹ Hosting ▹ Cloud Storage ▹ Realtime DB ▹ Crashlytics ▹ Testlab ▹ etc... EL producto insignia 8
Comparación Realtime DB ▹ Json ▹ Offline (Android, iOs) ▹
Consultas básicas ▹ En produccion ▹ Escalamiento fragmentado Cloud firestore ▹ Documentos ▹ Offline (Android, iOs, web) ▹ Consultas avanzadas ▹ En Beta ▹ Escalamiento automático 9
10
Codelab https://codelabs.developers.google.com/codel abs/firestore-android/#0 11
Acciones/Data ▹ Agregar ▹ Leer ▹ Borrar ▹ Actualizar ▹
Sincronizar ▹ Colecciones ▹ Documento ▹ Snapshots ▹ Documents ▹ Changes 12
13 Leer/Sincronizar //leer db.document("Some Element").get().addOnCompleteListener { task -> } //sincronizar
db.document("Some Element").addSnapshotListener{ snapshot, exception -> }
14 Agregar db.collection("notes") .add(note.asMap()) .addOnCompleteListener { task -> } .addOnFailureListener
{ exception -> }
15 Eliminar db.document("Some Element") .delete() .addOnCompleteListener { task -> }
.addOnFailureListener { exception -> }
16 Actualizar db.document("Some Element") .update(newValues) .addOnCompleteListener { task -> }
.addOnFailureListener { exception -> }
Ejemplo 17
18 Datos data class Note(val id: String, val content: String)
{ fun asMap(): Map<String, String> = mapOf( Pair("id", id), Pair("content", content) ) }
19 Adapter class Adapter : RecyclerView.Adapter<Holder>() { private val notes
= ArrayList<Note>() override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = Holder.create(LayoutInflater.from(parent.context.inflate(R.layout.note_item, parent, false)) override fun getItemCount(): Int = notes.size override fun onBindViewHolder(holder: Holder, position: Int) { holder.bind(notes[position]) } fun sync(note: Note) { notes.add(note) notifyItemInserted(notes.size - 1) } }
20 Holder class Holder(itemView: View?) : RecyclerView.ViewHolder(itemView) { companion object
{ fun create(view: View) = Holder(view) } fun bind(note: Note) { itemView.note_name.text = note.content } }
21 Sincronizar notas class MainActivity : AppCompatActivity() { override fun
onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ... db.collection("notes") .orderBy("id", Query.Direction.ASCENDING) .addSnapshotListener { snapshot, exception -> snapshot?.run { documentChanges!! } .run { this!! } .filter { it.type == DocumentChange.Type.ADDED } .map { it.document.toNote() } .forEach { adapter.sync(it) } } } }
Gracias! Preguntas? encuentrame: @iyubinest
[email protected]
22