Fork me on GitHub
#off-topic
<
2018-05-19
>
souenzzo15:05:20

This idea hangs in my head a few months. With the ideas of #datomic and #om , we should be able to have the "frontend" with the few steps: 1- each route is described as a query [{[:user/id ?id] [:user/name :as :ui.title/name]}] 2- there is function that maps the route /user/33 to "params-state" {?id 33} 3- the query [{[:user/id 33] [:user/name :as :ui.title/name]}] will generate something like [{:ui.title/name "Foo Bar"}] 4- There is a thing* that that describes how-to "render" the data, basead in the key names {:ui.title/name (fn [ctx] [:div.my-title (:value ctx)])} 5- once I have data and component description, it will generate smething like [:div.my-title "Foo Bar"] and it will be rended. I think the "most missing" piece is the step 4 It differ from #om/ relay once "query -> data, data + components descriptions -> ui", in place of "components -> query -> data -> ui" There is some lib/framework that do something like that?

Alex Miller (Clojure team)15:05:23

Vase is a step in that direction

👍 4
gklijs15:05:26

As long as it's not interactive that will work. I have a small pet project which doesn't even have site users. So I have some data from redis based on the path, combined with some hiccup templates to get the HTML.