-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from andrzejchm/feature/circleci-setup
general refactoring + adding sample with dagger
- Loading branch information
Showing
29 changed files
with
760 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,43 @@ | ||
DroidMVP | ||
======== | ||
# DroidMVP | ||
[![CircleCI](https://circleci.com/gh/andrzejchm/DroidMVP/tree/develop.svg?style=svg)](https://circleci.com/gh/andrzejchm/DroidMVP/tree/develop) | ||
|
||
TODO: | ||
##About | ||
DroidMVP is a small Android library to help you incorporate the [**MVP pattern**](http:https://antonioleiva.com/mvp-android/) along with [**Passive View**](http:https://martinfowler.com/eaaDev/PassiveScreen.html) and [**Presentation Model**](http:https://martinfowler.com/eaaDev/PresentationModel.html) (yes, those can be combined together :) ) within your Android project. | ||
|
||
* fill up this readme | ||
* make the androidSample implement DroidMVP library | ||
* add sample for MVPDelegate | ||
* add sample for Dagger injection of presenter | ||
##Explanation | ||
|
||
**Pasive View** | ||
|
||
> A screen and components with all application specific behavior extracted into a controller so that the widgets have their state controlled entirely by controller. - **Martin Fowler** | ||
-- | ||
**Presentation Model** | ||
|
||
> Represent the state and behavior of the presentation independently of the GUI controls used in the interface - **Martin Fowler** | ||
-- | ||
|
||
#####Model and Presenter | ||
In our case a controller will be our presenter, which stores the view state within the Presentation Model. All the state manipulation happens within the Model class itself, but it is the Presenter who initiates those modifications. | ||
|
||
#####View | ||
Our passive view is the activity or fragment, which will be treated as a widget container with the ability to present different states driven by the presenter. All user interaction should be routed to the presenter. | ||
|
||
##Setup | ||
|
||
setup goes here | ||
|
||
##Composition over inheritance | ||
If by any chance you cannot extend from `DroidMVPActivity` or `DroidMVPFragment` you can always use the `DroidMVPViewDelegate`. Just make sure to bind it with your activity's or fragment's lifecycle the same way the `DroidMVPFragment` or `DroidMVPActivity` does it. | ||
|
||
##Dependency Injection | ||
This library makes it easy to use it with dependency injection frameworks like [Dagger](http:https://google.github.io/dagger/). To see how it could be done, check out the [**Sample project**](#sample), specifically the `BaseFragment` or `BaseActivity` | ||
|
||
##Sample Project | ||
A small android app which uses Dependency Injection along with **DroidMVP** can be found | ||
[**here**]() | ||
|
||
##TODO: | ||
|
||
* add to jitpack | ||
* add to android arsenal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.