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
920
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
67
KMP_for_Swift.pdf
kikoso
0
87
Android Benchmarking and other stories
kikoso
0
580
KMP for Mobile Developers
kikoso
0
110
Diving into Coroutines
kikoso
1
110
K/N for mobile developers (including libraries' snippets)
kikoso
0
130
Kotlin/Native for Multiplatform development
kikoso
0
93
TensorFlow for Mobile Developers
kikoso
0
21
Kotlin/Native for Multiplatform development
kikoso
1
230
Other Decks in Programming
See All in Programming
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
250
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
380
Workers Cache を知る
syumai
0
350
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
770
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
130
The Rails Doctrine Decade
koic
2
560
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.3k
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
100
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
110
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
Featured
See All Featured
Thoughts on Productivity
jonyablonski
76
5.4k
Are puppies a ranking factor?
jonoalderson
2
4k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
30 Presentation Tips
portentint
PRO
1
430
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
We Are The Robots
honzajavorek
0
400
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
210
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
350
Typedesign – Prime Four
hannesfritz
42
3.2k
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