Skip to content

Commit

Permalink
[docs] improv: changelog, readme, todo and migration guide before 1.2…
Browse files Browse the repository at this point in the history
….0-alpha
  • Loading branch information
mkoslacz committed Dec 20, 2016
1 parent 2127c97 commit a0a7485
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 14 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
## 1.2.0-alpha

### Breaking changes

This release introduces some breaking changes. All stuff listed below is also mentioned in the [Migration guide](https://github.com/mkoslacz/Moviper/blob/master/MIGRATION_GUIDE.md).
* Simplified Moviper internals to ease the troubleshooting and debugging.
* Rename some methods to make them more self-explaining.
* Removed Wipe (View-Interactor-Presenter-Entity) and Perv (Presenter-Entity-Routing-View) components as they did not add much value to the project but still needed the maintenance.
* Removed deprecated methods.

### General

* Introduced even more samples, now with VIPER testing showcases inside.

### Enhancements

* Added support for `ViewHolder`s. Now they can represent a View in a VIPER architecture. See `sample-recyclerview`.

### Internal

* Routing activity attaching moved from constructor to the routing lifecycle.
* Simplified a VIPER components lifecycle.
* Simplified a presenter architecture.
* Simplified a routing architecture.
* Bumped dependencies versions:
- RxJava to 1.2.3
- buildtools to 25.0.2
- support libs to 25.1.0


### Credits

Many thanks to guys that helped me in Moviper development implementing my ideas.
* [Tomasz Najda](https://github.com/tomasznajda) - simplifying Moviper architecture,
* [Bartosz Wilk](https://github.com/bartoszwilk) - Moviper templates,
* [Jakub Jodelka](https://github.com/jakubjodelka) - Moviper samples, VIPER ViewHolders.


## 1.1.0-alpha

### General
Expand Down
67 changes: 67 additions & 0 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
## Classes

| **1.1.0-alpha** | **1.2.0-alpha** |
|---------------------------------|---------------------------|
| MvpActivity | ViperActivity |
| MvpLceActivity | ViperLceActivity |
| MvpLceViewStateActivity | ViperLceViewStateActivity |
| MvpViewStateActivity | ViperViewStateActivity |
| MvpFragment | ViperFragment |
| MvpLceFragment | ViperLceFragment |
| MvpLceViewStateFragment | ViperLceViewStateFragment |
| MvpViewStateFragment | ViperViewStateFragment |
| PervActivityBasePresenter | removed |
| PervActivityBaseRxPresenter | removed |
| PervFragmentBasePresenter | removed |
| PervFragmentBaseRxPresenter | removed |
| WipeBasePresenter | removed |
| WipeBaseRxPresenter | removed |
| ViperActivityBasePresenter | BasePresenter |
| ViperActivityBaseRxPresenter | BaseRxPresenter |
| ViperFragmentBasePresenter | BasePresenter |
| ViperFragmentBaseRxPresenter | BaseRxPresenter |
| ActivityBaseRouting | BaseRouting |
| ActivityBaseRxRouting | BaseRxRouting |
| ActivityBaseViewHelperRouting | BaseViewHelperRouting |
| ActivityBaseViewHelperRxRouting | BaseViewHelperRxRouting |
| FragmentBaseRouting | BaseRouting |
| FragmentBaseRxRouting | BaseRxRouting |
| FragmentBaseViewHelperRouting | BaseViewHelperRouting |
| FragmentBaseViewHelperRxRouting | BaseViewHelperRxRouting |

## Interfaces

|** 1.1.0-alpha** | **1.2.0-alpha** |
|------------------------------------|-----------------------------|
| MoviperInteractor | ViperInteractor |
| MoviperRxInteractor | ViperRxInteractor |
| MoviperPresenter | ViperPresenter |
| MoviperActivityPresenterForRouting | ViperPresenterForRouting |
| MoviperFragmentPresenterForRouting | ViperPresenterForRouting |
| MoviperPresenterForRouting | ViperPresenterForRouting |
| MoviperPresenterForInteractor | ViperPresenterForInteractor |
| MoviperRouting | ViperRouting |
| MoviperRxRouting | ViperRxRouting |
| MoviperViewHelperRouting | ViperViewHelperRouting |
| MoviperViewHelperRxRouting | ViperViewHelperRxRouting |
| MoviperViewHelper | ViperViewHelper |

## Methods

| **1.1.0-alpha** | **1.2.0-alpha** |
|-----------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|
| MoviperActivityPresenterForRouting#createRouting(Activity activity) MoviperFragmentPresenterForRouting#createRouting(Fragment fragment) | ViperPresenterForRouting#createRouting() |
| MoviperPresenterForRouting#isRoutingAttached() | removed |
| MoviperPresenterForInteractor#isInteractorAttached() | removed |
| MoviperRouting#attachPresenter(PresenterType presenter) | ViperRouting#attach(ActivityHolder activity, PresenterType presenter) ViperRxRouting#attach(ActivityHolder activity) |
| MoviperRouting#detachPresenter() MoviperRxRouting#onPresenterDetach() | CommonViperRouting#detach(boolean retainInstance) |
| Interactor#attachPresenter() | ViperInteractor#attach(PresenterType presenter) ViperRxInteractor#attach() |
| Interactor#detachPresenter() Interactor#onPresenterDetach() | CommonViperInteractor#detach(boolean retainInstance) | | 1.2.0-alpha |
|-----------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|
| MoviperActivityPresenterForRouting#createRouting(Activity activity) MoviperFragmentPresenterForRouting#createRouting(Fragment fragment) | ViperPresenterForRouting#createRouting() |
| MoviperPresenterForRouting#isRoutingAttached() | removed |
| MoviperPresenterForInteractor#isInteractorAttached() | removed |
| MoviperRouting#attachPresenter(PresenterType presenter) | ViperRouting#attach(ActivityHolder activity, PresenterType presenter) ViperRxRouting#attach(ActivityHolder activity) |
| MoviperRouting#detachPresenter() MoviperRxRouting#onPresenterDetach() | CommonViperRouting#detach(boolean retainInstance) |
| Interactor#attachPresenter() | ViperInteractor#attach(PresenterType presenter) ViperRxInteractor#attach() |
| Interactor#detachPresenter() Interactor#onPresenterDetach() | CommonViperInteractor#detach(boolean retainInstance) |
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ To avoid manually creating all VIPER class files and managing their dependencies

### Great! But I'm used to go with Mosby. What about all of its goodies?

You are able to use all of the Mosby's MVP Views with Moviper. MvpFragment, MvpLceActivity, ViewStateFragment etc. are fully compatibile with Moviper presenters.
Moviper has all of the Mosby's MVP Views mapped to fit VIPER requirements. Just simply replace `Mvp` with `Viper` and let the Android Studio do the autoimport for you.

For example `MvpFragment` maps to `ViperFragment`.

## Dependency

```groovy
dependencies {
compile 'com.mateuszkoslacz.moviper:moviper:1.1.0-alpha'
compile 'com.mateuszkoslacz.moviper:moviper:1.2.0-alpha'
}
```

If you are upgrading Moviper you should probably check out the [Changelog](https://github.com/mkoslacz/Moviper/blob/master/CHANGELOG.md) and/or the [Migration guide](https://github.com/mkoslacz/Moviper/blob/master/MIGRATION_GUIDE.md).

## Getting started

First of all, check out the samples. After that, just create a VIPER files set using [Moviper Template Generator](https://github.com/mkoslacz/MoviperTemplateGenerator), fill up the contract, generate missing methods using Android Studio autofix
Expand Down Expand Up @@ -67,9 +71,22 @@ Moviper.getInstance().getPresenterInstance(SomePresenter.class, "someName")
.subscribe(somePresenter -> somePresenter.someMethod(false)); // exactly one or zero Presenters with given name and class goes here
```

### VIPER ViewHolders

For complex RecyclerView list elements and/or multiple views on RecyclerViewlist you can design your app in the way that treats every list element as a separate VIPER View with its own contract.
Generating such ViewHolders is supported in the [Moviper Template Generator](https://github.com/mkoslacz/MoviperTemplateGenerator).
For the sample usage check out the `sample-recyclerview`.

## Examples

For the basic usage just check out the `rxsample` (or `sample`, if you aren't familiar with [RxJava](https://github.com/ReactiveX/RxJava)) module in this repo. For the IPC usage check out the `ipcsample` module.
For the basic usage just check out the `sample-rx` (or `sample`, if you aren't familiar with [RxJava](https://github.com/ReactiveX/RxJava)) module in this repo. Most of samples include showcases of test scenarios for given Moviper usecases.

More advanced usage:
- Inter-Presenter-Communication — `sample-ipc`,
- VIPER ViewHolders - `sample-recyclerview`,
- Repository Design Pattern usage in Interactors and tests - `sample-rx-rdp`
- ViewState usage - `sample-rx-viewstate`
- Activity/Fragment retaining presenter - `sample-rx-presenter`

## Credits

Expand Down
11 changes: 0 additions & 11 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
#Viper-framework TODOs:
- add sample showcasing Moviper inter-presenter communications
- add helper methods to BasePresenters, Interactors etc: ifViewIsAttachedDo( () -> {actions});
- learn & implement Dagger2 Viper injection (to use in example and maybe to remove passing
activity through presenter to let it be android-free. another (no-dagger) option is to pass
newly created routing to presenter constructor)
- add lifecycle driven version of contract
- learn & implement Viper testing using Dagger & Mocks
- add better docs for Viper framework (Mvp, Perv, Wipe, Viper use cases etc)
- create super rx versions of base classes
- create reasonable samples of lib usage (basic, rx, tests with dagger)
- create non-ViewHelper versions of Perv and Viper
- extract Viper framework to separate library
- create Android Studio plugin for creating appropriate classes and interfaces set
- choosing root viper dir
- choosing view name
Expand Down

0 comments on commit a0a7485

Please sign in to comment.