Top Banner
Forgetting Android Jorge J. Barroso Tech Lead Android Core [email protected] @flipper83
22

Forgetting android

Aug 27, 2014

Download

Software

Jorge Barroso

This talk is about use clean architecture on android development.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Forgetting android

Forgetting Android

Jorge J. Barroso!Tech Lead Android [email protected]!@flipper83

Page 2: Forgetting android
Page 3: Forgetting android

Any fool can write code that a computer can understand. Good programmers write code that humans can understand.!Martin Fowler

Page 4: Forgetting android
Page 5: Forgetting android

1 Solid

Page 7: Forgetting android

Clean Architecture2

Page 8: Forgetting android

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”

Page 9: Forgetting android

UI

External!Interfaces

Db

Push

Network

Storag

e

Inte

rface

s

Inte

rface

s

Business Model

Interactors

Interactors

Page 10: Forgetting android

UI!Layer

UI!Layer

UI!Data Model

Data Mapper

Bou

ndar

y Interactor

Bussines!Data Model

Data!Storage

Test!Storage

Data Mapper

Data Mapper

Storage!Data Model

Test!Data Model

Page 11: Forgetting android

FeedViewModel

FeedBoundary

FeedListFragment

FeedProvider

GetFeed GetFeedImp

List<Hipster>

User!DataSource!

Net

Use

rDat

aSou

rce

Like

Dat

aSou

rce

Like!DataSource!

Parse

API

UserApi

API

Retrofit!api

Parse!api

Page 12: Forgetting android

Conclusion3

http://www.flickr.com/photos/inf3ktion/

Page 13: Forgetting android

Good Layer Responsabilites

Page 14: Forgetting android

Easy to test and mock

Page 15: Forgetting android

Easy to add or modify code

Page 16: Forgetting android

Easy to hide implementations

Page 17: Forgetting android

Easy to find smells

Page 18: Forgetting android

Async code

Page 19: Forgetting android

Duplicate data model

Page 20: Forgetting android

Change your mind

Page 21: Forgetting android

Not silver bullets