Lightning Talk (The Other MVP)

Model View Presenter (MVP)

A way of separating user interaction, data manipulation, server requests and response handling and updating the UI.

  • View is a layer that displays data and reacts to user actions. On Android, this could be an Activity, a Fragment, an android.view.View or a Dialog.
  • Model is a data access layer such as database API or remote server API.
  • Presenter is a layer that provides View with data from Model. Presenter also handles background tasks.

 

  • pic2.png

 

Pros

  • Separation of Concerns 
    • Asynchronous Tasks
    • UI Testing

Cons

  • Learning Curve
  • Redundancy

 

Excellent Introduction

Example Repo w/ Google Maps

(credit to Johnil Quezada)

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s