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
Enrique López Mañas
November 29, 2015
Programming
0
900
Event-Driven Programming at Android (but not RxJava!)
Presentation at the DevFest Istanbul
Enrique López Mañas
November 29, 2015
Tweet
Share
More Decks by Enrique López Mañas
See All by Enrique López Mañas
Composifying Your Not-Compose Code
kikoso
0
35
KMP_for_Swift.pdf
kikoso
0
64
Android Benchmarking and other stories
kikoso
0
410
KMP for Mobile Developers
kikoso
0
80
Diving into Coroutines
kikoso
1
82
K/N for mobile developers (including libraries' snippets)
kikoso
0
110
Kotlin/Native for Multiplatform development
kikoso
0
76
TensorFlow for Mobile Developers
kikoso
0
21
Kotlin/Native for Multiplatform development
kikoso
1
200
Other Decks in Programming
See All in Programming
How to stabilize UI tests using XCTest
akkeylab
0
130
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
140
Unity6.3 AudioUpdate
cova8bitdots
0
140
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
270
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
420
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.6k
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
280
安いハードウェアでVulkan
fadis
0
130
文字コードの話
qnighy
44
17k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
630
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
150
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
8.9k
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Abbi's Birthday
coloredviolet
2
5.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
290
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
150
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
260
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
A designer walks into a library…
pauljervisheath
210
24k
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