UIs are streaming DAGs
videoSubtitle
hyperfiddle/photon: a streaming Clojure dialect specialized for full-stack UI
Categories
Ideas
We would want to create UIs where we can just declare what data to pull from UIs and not care about.
This can be done by defining UIs as a DAG of operations and data.
This interfaces should be reactive, like in ReacJS.
To do this, the data should be streamed.
For this to work it should run natiley async.
This ideas are implemented on a Clojure dialect: photon
In photon, both the client and the server run their DAG in parallel.
Each one gets as far as it can with the data they have and then wait.
The server predicts what the client will need, and streams it without being asked.
Client inputs are bound to a variable that the seer can access.
It can build the DAGs through functions and lambdas
They explain how they do it, as a operation they call `splice`
Described as a
monadic join operation
They call the DAG a
self-adjusting computation
References
Breaking down FRP
Main ideas (recap)
UIs are streaming DAGs
Compiler-managed network
Secure, can degrade to REST
Eliminates need for
Backend to frontend patterns
GraphQL, Relay, client-side ORM
Web framework
Hosted by
Clojure/Script
Complete metadata
chore