code • Many Android components viz Activity, Fragment, Broadcast Receiver, Service, AsyncTask etc. Writing your own domain components on top of these, code starts to look like a ‘spaghetti’ • It’s extremely difficult to maintain a good software design, even before scale. • Code contains dependencies concealed inside big classes, no way to test and debugging takes more time • Gradually, the code becomes less D.R.Y, more open for modification, gets loaded with generic interfaces which you dare to modify • It’s like playing a game of Go and slowly exhausting all your options
• Helps reinforce S.O.L.I.D, K.I.S.S and D.R.Y • Writing test cases is a breeze • Handle config changes easily from one place, by caching presenters independently of View classes
on runtime graph compositions and reflection • Dependency Injection Framework using Annotation Processors • Helps implement ‘D’ part of S.O.L.I.D principle • Separate class system which manages all the dependencies inside code using Modules/Components/SubComponents • Then for unit testing, these modules can be swapped with mock modules • Simplifies access to shared instances • Custom Scoped Instances • Multibinding
• Simplifies the ability to chain async operations (using Schedulers) • Eliminates the need for unnecessary state variables, which can add bugs • Android can be more efficiently described as a system which operates on streams of data which are asynchronously emitted from various sources (Observables) • From touch events, broadcasts, service and network callbacks etc. All these events can be easily modeled using reactive extensions which work best with the Observer pattern • Ton of operators • Backpressure
MVVM RxJava Samples Codepath Guides Google Sample - MVP Callback Hell Reactive Programming Reactive Extensions RxJava Official Wiki Activities are not UI elements Why MVP in Android ? Marvel app MVP Dribble Client MVP