This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-22
Channels
- # announcements (6)
- # babashka (8)
- # beginners (136)
- # cider (5)
- # cljs-dev (1)
- # cljsrn (1)
- # clojure (198)
- # clojure-argentina (4)
- # clojure-australia (1)
- # clojure-europe (25)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-poland (1)
- # clojure-spec (4)
- # clojure-uk (4)
- # clojuredesign-podcast (4)
- # clojurescript (36)
- # conjure (11)
- # data-science (1)
- # datomic (6)
- # defnpodcast (1)
- # deps-new (5)
- # emacs (7)
- # events (1)
- # fulcro (10)
- # graalvm (9)
- # graalvm-mobile (10)
- # helix (9)
- # introduce-yourself (1)
- # jackdaw (1)
- # jobs-discuss (5)
- # kaocha (6)
- # lsp (10)
- # malli (11)
- # missionary (28)
- # off-topic (2)
- # pathom (24)
- # pedestal (7)
- # portal (1)
- # re-frame (12)
- # reagent (2)
- # reitit (1)
- # remote-jobs (1)
- # sci (7)
- # shadow-cljs (6)
- # sql (6)
- # tools-deps (10)
- # vim (9)
- # xtdb (19)
hello @hiskennyness, just got the time to read your response 🙂, so, I can see what you mean by fully data management, and I think Fulcro surely does that as well. About the "cell-style" for recomputation of attributes, that's something Fulcro does in a different way. Instead of rely on the node graphs for the UI render, Fulcro relies on a normalize database, so it tries to guarantee data consistency using normalized data, a fulcro DB usually looks like this:
{:user/id {1 {:user/id 1
:user/name "Kenny"
:user/group [:group/id 1]}
2 {:user/id 2
:user/name "Wilker"
:user/group [:group/id 1]}}
:group/id {1 {:group/id 1
:group/name "Clojure Devs"}}}
this way, when data needs to change, we can change in the entity, and all parts of the UI that look at that entity can refresh the data after DB changes (local, in-memory db, that data structure)
for the part of describing the data relationships, Fulcro uses EQL + Pathom, that's a bigger story, but just to be brief, you can define in Pathom the relationships, and in Fulcro you trigger a "load" to "recompute" the data
quick question while you're hero wilker: how does fulcro handle secondary keys (if at all)?
i.e. I want to be able to refer to a user by both [:user/id 1]
and [:user/email "
it doesn't, usually what we do is keep id
based on the client, but using Pathom you can start the query using a secondary key like :user/email
, and let the id
load from it
never really tried doing it, but I can see the appeal