test - Huge Activities and Fragments are impossible to unit test - People start to not test anything at all, because vast amount of logic belongs to Activities / Fragments anyways
test - Huge Activities and Fragments are impossible to unit test - People start to not test anything at all, because vast amount of logic belongs to Activities / Fragments anyways - Multiple responsibilities - same class is doing complex animations and converting data from DB / REST format to the Adapter
Mosby is a library, not a framework - Still, it influences your design a little bit, we wanted to avoid that - Some problems that already have ready solutions in Mosby, we wanted to solve in a different way (like retaining presenters)
to Presenter operating on raw data - like row ids in terms of clicking on a List View is responsible for performing Animations Implements an interface Activity / Fragment / Custom View
of the code. - Converts Model’s data to be easily displayed on a View. - Is retained between configuration changes, like orientation changes (more about that few slides further!)
of the code. - Converts Model’s data to be easily displayed on a View. - Is retained between configuration changes, like orientation changes (more about that few slides further!) - In a nutshell, everything that stayed in a Fragment in our non-MVP architecture, but wasn’t strictly UI related.
of the code. - Converts Model’s data to be easily displayed on a View. - Is retained between configuration changes, like orientation changes (more about that few slides further!) - In a nutshell, everything that stayed in a Fragment in our non-MVP architecture, but wasn’t strictly UI related. - Doesn’t implement an interface
interfaces will force you to explicitly map your Interfaces to Concrete implementation - It doesn’t change anything from the unit tests perspective - you can still stub your concrete classes
interfaces will force you to explicitly map your Interfaces to Concrete implementation - It doesn’t change anything from the unit tests perspective - you can still stub your concrete classes https://medium.com/@mherych/do-i-need-to-create-interfaces-for-my-pres enters-9abe0897f873#.896w7lyt7
Presenters shouldn’t be using Android components. - We do not. - Sometimes you need to delegate lifecycle methods (onPause(), onStart(), …) - Presenter is in fact still a presentation layer
Presenters shouldn’t be using Android components. - We do not. - Sometimes you need to delegate lifecycle methods (onPause(), onStart(), …) - Presenter is in fact still a presentation layer - No real benefits (?)
- The REAL stuff happens here - Not related to Android, no Android SDK is being used - Basically it starts with some interface that reflects some business process...
- The REAL stuff happens here - Not related to Android, no Android SDK is being used - Basically it starts with some interface that reflects some business process… - … and then consists from various classes that are splitted by their responsibilities
- The REAL stuff happens here - Not related to Android, no Android SDK is being used - Basically it starts with some interface that reflects some business process… - … and then consists from various classes that are splitted by their responsibilities (db repositories, retrofit services, actual business logic, etc.)
use retained Fragments (meh) Deprected so you won’t break LoaderManager and FragmentManager, not because it’ll be removed anytime soon Yep, we use the exact same mechanism Android is using for retaining FragmentManager and LoaderManager
use retained Fragments (meh) Deprected so you won’t break LoaderManager and FragmentManager, not because it’ll be removed anytime soon Yep, we use the exact same mechanism Android is using for retaining FragmentManager and LoaderManager Finally, getLastCustomNonConfiguration(), not deprecated, in AppCompatActivity.