Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introducción a Firebase
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Cristian Fabian Gómez Rojas
July 26, 2018
Technology
89
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
52
Rx UI
iyubinest
0
41
Código limpio en la UI para Android, mejores prácticas.
iyubinest
1
310
Código limpio en la UI para Android, mejores prácticas.
iyubinest
0
390
Other Decks in Technology
See All in Technology
10年欲しかった音楽管理アプリを、AIと一緒に作りはじめた
judau
1
200
高負荷プロダクション環境におけるAWS Lambdaのリアル 〜スケールとコストを左右する実行ライフサイクルの技術仕様〜
maimyyym
2
850
個別開発で終わらせない。 現場の課題をプロダクトの強さに変える StockmarkのFDE
ktkrhr
0
530
AI臭い文章とは何なのか
nasuvitz
37
76k
Account Factory for Terraformによる 標準化されたアカウント発行の自動化
pensuke628
0
120
サーバーフルコンピューティング?AWS Lambda
iwatatomoya
0
120
BedrockとLambdaで作る リアルタイム進行型推理ゲーム
kawametho
0
150
CI/CDではもう遅い - 人とAIが迂回しないDevSecOps Verify基盤の再設計 -
kintotechdev
1
620
いちAWSエンジニアのAI活用を振り返る #devio2026 / devio osaka 2026 kawahara
masahirokawahara
1
310
LLM機能を自作して分かるSnowflake Cortex AIの強み
nayuts
0
110
AWS DevOps Agent スキルをつかいこなそう / Master AWS DevOps Agent Skills
kinunori
2
650
人にやさしく、AIにやさしく、書き手を選ばないIaCのガードレール再考 / Rethinking IaC Guardrails for Humans and AI Alike
kohbis
5
2k
Featured
See All Featured
A Soul's Torment
seathinner
8
3.7k
Technical Leadership for Architectural Decision Making
baasie
3
590
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
610
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
How to Talk to Developers About Accessibility
jct
2
560
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Are puppies a ranking factor?
jonoalderson
2
4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
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