/ReactiveArchitectureSwift

Reactive Architecture built in swift. Look to README for more information.

Primary LanguageSwift

'Reactive' Architecture Example

This app is nothing more than an example of how to architect a mobile application to best use Reactive style programming. This is very close to a MVVM (Model View ViewModel) application. This is a port from the original MVVMReactive

Reactive architecture breaks an application's interactions into single stream events. Instead of creating impure side effects on a stream, reactive architecture focuses on slamming asynchronous events into synchronous state events that update the UI. Reactive state event updates is very similar to REDUX.

Reactive architecture is built on MVVM. MVVM breaks down an application into more testable components keeping your internal business objects and data separate from the external UI or external data.

The app simply loads a list of "Now Playing" movies based on The Movie Database API.

The requirements for the app:

  1. As a user, show a list of "Now Playing" movies. Poster, Title, Release Date, & Rating.
  2. As a user, any rating at eight or above should be stared.
  3. As a user, I only want to see ratings rounded to the nearest whole digit.
  4. As a user, while scrolling, keep loading "Now Playing" movies until you hit the last page.

Demo

Demo of the app.

The application architecture is as followed:

Alt text

Note - the application packages are TYPE defined for ease of learning.

Usage

Apache License 2.0. Free to use & distribute.

Documentation

Please review all documentation in docs/. The following summaries describe their purpose:

Name Summary
AUTHORS.md History of past and present contributors
BUILDS.md Description of official builds
DEPENDENCIES.md How to generate a list of all major third party dependencies
STYLE.md Description of Code Style and Static Analysis tools

Build Types and Flavors

Only the original build types are release / debug. Use Debug since this not an app for the google play store. There are no flavors.

Tests

This project supports the following type of tests:

Unit Tests

Standards

Checkstyle (SwiftLint) (.swiftlint.yml)

https://github.com/realm/SwiftLint

Run on command line and pipe the information to a html file you can open in a browser.

Pods/SwiftLint/swiftlint lint --reporter html > reporter.html

Then open "reporter.html" in safari

Run All

N/A

Resources

  1. Medium - Reactive Redux Simply Managing State
  2. Github - Use Cases
  3. Medium - Don't Break the Chain
  4. Medium - State propagation in Android with RxJava Subjects
  5. Youtube - Managing State with RxJava by Jake Wharton
  6. Thoughts on Clean Architecture
  7. Optionals