Go to file
Rohan Sircar 935ca358e6 Many changes
Updated store code - wrapped fold function in Task
Added JSON logging functionality to store middleware
Initial attempt at creating filter combinator for fx observables
Made ListStore code use Effects
Made a router using the store pattern
Misc updates to fx monix implicits
2020-12-19 19:14:22 +05:30
project Added store pattern using monix 2020-12-15 12:51:25 +05:30
src/main Many changes 2020-12-19 19:14:22 +05:30
.gitignore Added store pattern using monix 2020-12-15 12:51:25 +05:30
.scalafmt.conf First commit 2020-08-27 19:58:18 +05:30
build.sbt Many changes 2020-12-19 19:14:22 +05:30
README.md first commit 2020-08-27 19:57:44 +05:30
UNLICENSE First commit 2020-08-27 19:58:18 +05:30

Monadic ScalaFX Demo

This is an experimental demo project in which I try to make use of the object functional nature of scala, it's expressive syntax, the actor model (Akka for now), ScalaFX DSL and pure functional programming concepts such as the IO monad to compose and create a lightweight, concurrent JavaFX GUI application.

Key aims of this demo -

  1. Use of IO monad, for now I'm using Monix's Task
  2. Pure, referentially transparent, lazy functions
  3. Avoiding global mutable state
  4. Reflection free JSON serialiation/deserialization(using Circe here)
  5. Compile time Dependency Injection (using Macwire in this case)
  6. Non blocking asynchronous I/O and green threading
  7. Lock free asynchronous mutable state synchronization using Actors or Monads such as Cats Ref or Monix Mvar
  8. Actors and green threads must run on the JavaFX Application Thread itself, to avoid nested Platform.runLater() callback hell. Such code must therefore be async and non blocking.
  9. Multiple thread pools are used depending on the nature of the computation. Currently there is one each for JavaFX application tasks, cpu bound or async blocking tasks, and blocking tasks.
  10. Make it possible to share code with Scala.js using cross compilation

While I've got the basic down, I do not have a lot of experience in monadic programming, so I must learn as I go. I would really appreciate any suggestions or advice.