helix

wilkerlucio 2021-07-22T22:02:13.305700Z

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"}}}

wilkerlucio 2021-07-22T22:02:47.306500Z

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)

wilkerlucio 2021-07-22T22:03:47.307600Z

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

lilactown 2021-07-22T22:06:01.308600Z

quick question while you're hero wilker: how does fulcro handle secondary keys (if at all)?

lilactown 2021-07-22T22:06:36.309300Z

i.e. I want to be able to refer to a user by both [:user/id 1] and [:user/email ""]

wilkerlucio 2021-07-22T22:09:29.310300Z

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

lilactown 2021-07-22T22:16:39.310800Z

gotcha. I am contemplating adding secondary keys to autonormal

lilactown 2021-07-22T22:17:33.311600Z

seems like a performance/complexity hole tho

wilkerlucio 2021-07-22T22:19:28.312Z

never really tried doing it, but I can see the appeal