Forgetting android

3,003 views

Published on

This talk is about use clean architecture on android development.

Published in: Software, Technology

Forgetting android

  1. 1. Forgetting Android Jorge J. Barroso! Tech Lead Android Core! jbarroso@tuenti.com! @flipper83
  2. 2. Any fool can write code that a computer can understand. Good programmers write code that humans can understand.! Martin Fowler
  3. 3. 1 Solid
  4. 4. Single responsibility principle Open/closed principle Liskov substitution principle Interface segregation principle Dependency inversion principle
  5. 5. Clean Architecture2
  6. 6. A good architecture allows you to defer framework decisions. A good architecture allows frameworks to act as plugins to the app.! Robert Martin “The database is a detail, a hardware detail. We would not use one at all if all our data could fit in memory for ever”
  7. 7. UI External! Interfaces Db Push Network Storage Interfaces Interfaces Business Model Interactors Interactors
  8. 8. UI! Layer UI! Layer UI! Data Model Data Mapper Boundary Interactor Bussines! Data Model Data! Storage Test! Storage Data Mapper Data Mapper Storage! Data Model Test! Data Model
  9. 9. FeedViewModel FeedBoundary FeedListFragment FeedProvider GetFeed GetFeedImp List<Hipster> User! DataSource! Net UserDataSourceLikeDataSource Like! DataSource! Parse API UserApi API Retrofit! api Parse! api
  10. 10. Conclusion3 http://www.flickr.com/photos/inf3ktion/
  11. 11. Good Layer Responsabilites
  12. 12. Easy to test and mock
  13. 13. Easy to add or modify code
  14. 14. Easy to hide implementations
  15. 15. Easy to find smells
  16. 16. Async code
  17. 17. Duplicate data model
  18. 18. Change your mind
  19. 19. Not silver bullets
  20. 20. http://jobs.tuenti.com! jbarroso@tuenti.com! @flipper83

×