Forgetting android

Post on 27-Aug-2014

85 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

This talk is about use clean architecture on android development.

Transcript

Forgetting Android

Jorge J. Barroso!Tech Lead Android Core!jbarroso@tuenti.com!@flipper83

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

1 Solid

Clean Architecture2

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”

UI

External!Interfaces

Db

Push

Network

Storag

e

Inte

rface

s

Inte

rface

s

Business Model

Interactors

Interactors

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

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

Conclusion3

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

Good Layer Responsabilites

Easy to test and mock

Easy to add or modify code

Easy to hide implementations

Easy to find smells

Async code

Duplicate data model

Change your mind

Not silver bullets

http://jobs.tuenti.com!jbarroso@tuenti.com!@flipper83

top related