(wiki) • Multitude of stakeholders • Separation of concerns - one reason to change • Run away from the real world (Android, DB, Internet) • Testability • SRP + Testability + … = Maintainability, Scalability, etc...
with the gritty details, no database, no Internet • Simple business logic constrained to itself or its children • Immutable • No persistence methods (stay tuned)
send them to view • Don’t know concrete view implementation (view as output port) • But tied to its lifecycle • User input delegated to presenters • Usually map entities to viewmodels
UI - separate component • Sensors, alarms, notifications, players, etc… • Define wrappers around Android objects in Device component • Define interface that wrapper will be implementing in domain component to serve as an output port
• This time real world are a database and the Internet • Classes such as SQLiteOpenHelper, DbModels, DAOs, Retrofit interfaces and services, API models, JSON parsers… • If you are using database only, DAO can implement a repository • Inner layers use entities, so you should also return entities -> mappers
case 3 ... Repository Location Notifications ... SRP Testable Not mixed with Android! UI designer cares about this UX designer cares about this BA, QA, PM care about this
case 3 ... Repository Location Notifications ... SRP Testable Not mixed with Android! UI designer cares about this UX designer cares about this BA, QA, PM care about this Nobody cares about this
case 3 ... Repository Location Notifications ... SRP Testable Not mixed with Android! UI designer cares about this UX designer cares about this BA, QA, PM care about this Backend guys care about this Nobody cares about this