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
Event-Driven Programming at Android (but not Rx...
Search
Enrique López Mañas
November 29, 2015
Programming
930
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Event-Driven Programming at Android (but not RxJava!)
Presentation at the DevFest Istanbul
Enrique López Mañas
November 29, 2015
Transcript
27 slides
Event-Driven Programming Not Reactive! Enrique López Mañas Google Developer Expert
& IT Consultor
#dfist Ego Slide • IT Consultor • Google Developer Expert
• @eenriquelopez
#dfist Similar programming paradigms • Event-Driven • Observer pattern •
Pub/Sub pattern • Dataflow programming
#dfist Reactive • Everything is a flow • Reactive is
more declarative, less imperative • Reactive is local, Event-Driven is global
#dfist Event-Driven • Actions (events) • Can decouple and communicate
#dfist Event-Driven
#dfist Event-Driven
#dfist Event-Driven • Greenbus • Otto • TinyBus
#dfist Event-Driven
#dfist Event-Driven
#dfist EventBus vs. BroadcastReceiver • BroadcastReceiver/Intent System • EventBus uses
standard Java classes as events • Do not have to set up intent extras, implement broadcast, extract.. • EventBus: much lower overhead
#dfist Event-Driven • Event-Bus • Event • Subscriber • Publisher
#dfist Event-Driven
#dfist Event-Driven EventBus.getDefault().register(this); EventBus.getDefault().unregister(this);
#dfist Event-Driven public void onEvent(AttachFragmentEvent event) { getFragmentManager().beginTransaction().replace(R.id.container, event.getFragment()).addToBackStack(null).commit(); }
#dfist Event-Driven public void onEvent(ShowSecondFragment event){ EDEventBus.postEvent(new AttachFragmentEvent(new SecondFragment())); }
#dfist Event-Driven • StickyEvents
#dfist Event-Driven • Model • View • Presenter
#dfist Event-Driven
#dfist Event-Driven • Android: not pure MVP • User Interface,
Views • Classes that inflates UI (Fragment, Activities)
#dfist Event-Driven
#dfist Model View Presenter • https://github.com/kikoso/Event-Bus-Architecture
#dfist Event-Driven WidgetObservable.text(email) .map(textChangedMap) .map(validateInputs) .startWith(false) .distinctUntilChanged() .subscribe(ViewActions.setEnabled(submit));
#dfist Event-Driven • Loose decouple • Intercommunication • Scalability •
Testability
#dfist Event-Driven • Nested Events • Treating Producers Like Synchronous
Getters • Debugging • Classes explosion • Data in Events
#dfist I want your feedback! http://bit.ly/devFestFeedback
#dfist
More Decks by Enrique López Mañas
See All by Enrique López Mañas
Securing Android SDKs: A Defense-in-Depth
kikoso
0
24
Composifying Your Not-Compose Code
kikoso
0
86
KMP_for_Swift.pdf
kikoso
0
95
Android Benchmarking and other stories
kikoso
0
610
KMP for Mobile Developers
kikoso
0
130
Diving into Coroutines
kikoso
1
120
K/N for mobile developers (including libraries' snippets)
kikoso
0
140
Kotlin/Native for Multiplatform development
kikoso
0
100
TensorFlow for Mobile Developers
kikoso
0
21
Other Decks in Programming
See All in Programming
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
150
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
2
160
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
230
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
320
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
450
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
330
LLM 101
dalinaum
0
490
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.3k
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
140
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
320
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
210
Featured
See All Featured
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
560
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
How to Ace a Technical Interview
jacobian
280
24k
Scaling GitHub
holman
464
140k
Crafting Experiences
bethany
1
440
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
The Curse of the Amulet
leimatthew05
4
17k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Being A Developer After 40
akosma
PRO
92
590k
We Are The Robots
honzajavorek
0
440