gumil / kaskade Goto Github PK
View Code? Open in Web Editor NEW[INACTIVE] Simplifying state management
License: Apache License 2.0
[INACTIVE] Simplifying state management
License: Apache License 2.0
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.
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.
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
Unstable JS tests
Create README to explain what the sample app is all about
Put the sample projects in one directory to make the project structure cleaner:
Setting up CI stuff (Jacoco and Detekt) and selecting a server for CI.
Only setting up the CI
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?
Provide a way to easily test kaskade state changes when using onStateChanged
or using Flow
And a bonus would be setting up code static analyzers
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.
Ability for Kaskade to save states and replay them later.
Replay action/states could be:
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
Investigate Github Actions to run CI and as a replacement for TravisCI
Current flowchart for the action -> kaskade -> state
looks boring
RxJava would soon release RxJava3 https://github.com/ReactiveX/RxJava/releases/tag/v3.0.0-RC1
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.
Nice to have to offload wikis to github pages for ease of use.
Ideas:
https://orchid.netlify.com/
https://dev.to/cjbrooks12/how-to-document-a-kotlin-project-edc
https://www.mkdocs.org/
Since disposed Deferred objects are not being removed, eventually it can grow wasting too much space.
Do we really need a javadoc?
Coroutines would soon release cold streams and the new Flow type collides with Kaskade's Flow. To avoid confusion we need to rename the class.
Since it's Kotlin might as well try and support new and shiny features like multiplatform
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.
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.
Is there any chance to add Kotlin/JS support? The issue #5 doesn't mention JS target.
Implement DamFlow
behavior to io.reactivex.Observable
Might be the same with BehaviorSubject
but it would be nice to have the exclusion behavior.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.