Giter VIP home page Giter VIP logo

kaskade's People

Contributors

gumil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kaskade's Issues

Error when unsubscribing is not informative

When unsubscribing Kaskade, I get an error "IllegalFlowException". It was not informative to know what mistake was made. To make it easier to debug, please create informative errors.

Create READMEs inside sample

Create README to explain what the sample app is all about

  • What is trying to achieve?
  • What it shows?
  • How kaskade is used in its context?

Support for Threads/Executors

Currently Kaskade's concurrency is bounded by coroutines and Rx. There's no way to make use of Java Threads and Executors.

Should be easily done by making a reducer. We should also think if this is useful or we could just create a guide creating your own reducer with the use of threads

Enable handling multiple observers

LiveData could be easier since it handles multiple observers
Rx also uses subjects by default

Flow only handles one subscriber. This needs a major rework.

Setup CI

Setting up CI stuff (Jacoco and Detekt) and selecting a server for CI.
Only setting up the CI

Add replay functionality

Ability for Kaskade to save states and replay them later.

Replay action/states could be:

  1. replay(Map<Action, State>)

Optional:
2. replay(String) string json map of action and states
3. replay(File) file json of actions and states

We considered JSON as the format since it's more universal than other string markdown formats.

Number 2 and 3 might be implemented later or might be in a separate module to make the main module as lightweight as possible. This also means adding a json parser library and we don't want to add dependencies into the main module. A good idea would be to add an adapter to handle the parsing part.

It's also possible to make replay extensible as possible to be able to create user defined ways in replaying.

This should be started when #24 is done

Multiplatform support

Since it's Kotlin might as well try and support new and shiny features like multiplatform

Create wikis

The README reads too long with the samples of RxJava, Coroutines, and LiveData. We need to separate these details to a wiki to have more structure and make the README slimmer and be able to easily find what is needed.

Add support for Middlewares

Add ability to watch incoming actions and outgoing states

Something like this:

Kaskade.create<Action, State>(initialState) {
    watchActions { action ->
        // do something like send analytics
    }

    watchStates { state ->
        // do something like send analytics
    }
}

Is adding a middleware to the reducer also useful?

Rename process to dispatch

To be in line to the other Unidirectional Flow libraries, we should use dispatch as a method name. This makes it standardized and lesser context switching.

Implement cold streams on coroutine builder

Implement a sequence where it's possible to yield states on a coroutine block, for example:

on<SomeAction> {
   sequence {
        yield(State1())
        yield(State2(suspendedFunction())
    }
}

A good use case is when having a Loading and Success states where you need to start with the loading state and when a network call is finished then present the success state with the details coming from the network call.

Current problem built in sequences has @RestrictsSuspension and it does not let any suspending function to be called inside the sequence block and might need to implement something similar to fit the use case.

Sample Projects directory

Put the sample projects in one directory to make the project structure cleaner:

  • sample
    • android
    • kotlin

Testing module

Provide a way to easily test kaskade state changes when using onStateChanged or using Flow

DamObservable

Implement DamFlow behavior to io.reactivex.Observable

Might be the same with BehaviorSubject but it would be nice to have the exclusion behavior.

Kotlin/JS support

Is there any chance to add Kotlin/JS support? The issue #5 doesn't mention JS target.

LiveDataReducer

Reducer for LiveData

I'm not sure if anyone would want this.

It's just for making every module standardised with having a Reducer and State Listener implementation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.