Moviper v1.3.0-alpha Release Notes

Release Date: 2017-02-09 // about 7 years ago
  • ๐Ÿ’ฅ Breaking changes

    ๐Ÿš€ This release introduces some breaking changes. All stuff listed below is also mentioned in the Migration guide.

    • Unified methods for getting context in Routings.

    โœจ Enhancements

    Introduced:

    • AutoInject (Ai) Views that allow you to skip overriding the onCreate(...) / onViewCreated(..) method. Instead, in plain Ai Views you have to provide the layout id by overriding a getLayoutId() method and to perform any view injections, getting references to views etc. by overriding a injectViews() method. In addition, it contains the pre-baked classes, where these methods are already implemented inside of base classes for:
      • Butterknife,
      • DataBinding,
      • for Kotlin Android Extensions you have to use regular Ai Views.
    • ๐Ÿ’ป Passive Views (based on AutoInject ones) that enforces developer to create passive views, that are not aware of existence of Presenter. All communication from View to Presenter has to be done through providing Observables with given UI events. It's enforced by the fact that getPresenter() method of this kind of views does not return Presenter of some exact type, but as a general ViperPresenter, so calling any meaningful methods on it is impossible. As in the previous point, it also contains the pre baked classes for:
      • Butterknife,
      • DataBinding,
      • for Kotlin Android Extensions you have to use regular AiPassive Views.
    • MoviperPresentersDispatcher tool that allows you to choose the View's (especially Activity) presenter on the runtime without a need of putting it to the Bundle with all it's limitations.
    • ViperPresentersList that allows you to easily attach multiple presenters to the Passive Views.
    • ๐Ÿ‘ Service based VIPERs to allow you to maintain a uniform architecture between your app's views and services. It includes support for:
      • regular Service's
      • IntentService's
    • independent VIPERS to allow you to maintain a uniform architecture between your app's views and complex task objects that aren't strictly connected with any specific Android component.
    • โœ… a moviper-test module that contains useful testing tools:
      • FragmentTestRule to perform Fragment instrumentation tests in isolation,
      • MoviperActivityTestRule to perform Viper Activity instrumentation tests with proper cleanup,
      • ViewHolderTestRule to perform Recyclerview's ViewHolder instrumentation tests in isolation,
      • RxAndroidSchedulersOverrideRule to override AndroidSchedulers.mainThread() behaviour in unit tests,
      • ViewHolderUnitTestAcrivity to perform Recyclerview's ViewHolder Robolectric unit tests in isolation,
      • RecyclerViewMatcher to match RecyclerView's contents in Espresso instrumentation tests.

    And added some more Javadocs

    General

    • Introduced even more samples for new features:
      • sample-super-rx-ai-kotlin
      • sample-independent-viper
      • sample-ipc-ai
      • sample-rx-ai
      • sample-service
      • sample-super-rx-ai
      • sample-super-rx-ai-kotlin
      • sample-super-rx-databinding

    Internal

    • โœ… Increase tests coverage, also for non-TDD libs that we base onto.
    • โฌ†๏ธ Bumped dependencies versions:
      • RxJava to 1.2.6

    Credits

    Once again, many thanks to guys that helped me in Moviper development implementing my ideas under my guidance:

    • โœ… Tomasz Najda - extracting moviper-test module, implementing Viper services and independent Vipers and samples for the latter,
    • โœ… Bartosz Wilk - Moviper templates, some Ai Views, improving test coverage, implementing MoviperPresetnersDispatcher, super-rx-ai sample,
    • Jakub Jodelka - Viper service sample.