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
Event-Driven Programming at Android (but not Rx...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Enrique López Mañas
November 29, 2015
Programming
900
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
More Decks by Enrique López Mañas
See All by Enrique López Mañas
Composifying Your Not-Compose Code
kikoso
0
44
KMP_for_Swift.pdf
kikoso
0
72
Android Benchmarking and other stories
kikoso
0
490
KMP for Mobile Developers
kikoso
0
90
Diving into Coroutines
kikoso
1
91
K/N for mobile developers (including libraries' snippets)
kikoso
0
120
Kotlin/Native for Multiplatform development
kikoso
0
83
TensorFlow for Mobile Developers
kikoso
0
21
Kotlin/Native for Multiplatform development
kikoso
1
210
Other Decks in Programming
See All in Programming
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
180
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.2k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.2k
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
480
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
0
190
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
4
2.3k
A2UI という光を覗いてみる
satohjohn
1
120
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
180
AI時代のUIはどこへ行く?その2!
yusukebe
19
7k
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
130
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
240
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
210
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
107
250k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
The Curse of the Amulet
leimatthew05
1
13k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
280
Google's AI Overviews - The New Search
badams
0
1k
Producing Creativity
orderedlist
PRO
348
40k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
240
Transcript
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