Fork me on GitHub
#fulcro
<
2021-02-10
>
tony.kay06:02:42

Part 3a (to be continued) of Grokking Fulcro is now available. This one’s a bit long. https://youtu.be/r1bMQxTr2QA

tony.kay07:02:56

Part 3 is essentially going through the concepts and challenges of UI + data models that now lead to what exists in Fulcro. The second part of this will drop as time allows.

👍 31
4
zhuxun218:02:46

Could fulcro provide something similar to helix's "$"? (https://github.com/lilactown/helix/blob/master/docs/creating-elements.md#-macro) I think being able to omit the definition of ui-mysc for smaller sc's is very convenient

tony.kay18:02:09

It could, but not sure it will. Aliases to shorter names are trivial and can be done by your own code for your preferences, as can wrapper macros that make similar syntactic sugar for your taste. I probably will eventually (as time allows) be adding something that can create lighter-weight on-demand components whose existence is purely for query/normalization purposes. For example, a non-registered query/ident thing that could be used like this (df/load :my-key (sc :person/id [:person/id :person/name {:person/address (sc :address/id [:address/id :address/street])}]))]

👍 3
tony.kay18:02:55

where you could hand-code an ident/query pair into a non-ui unit that responds to get-ident and get-query for use in normalization cases without so much real overhead as creating a formal registered defsc.

tony.kay18:02:13

RAD also has the intentional design of being able to dynamically generate components on the fly. Imagine a “form designer” as a user feature, where they say what columns and the basic layout, and it generates the code/ui route on the fly and installs it into the app (storing the user parameters in your database for later re-use)

👍 7
tony.kay18:02:44

Fulcro and RAD already have everything you need to do that…other than people writing the “convenience” APIs on top of the base primitives.

👍 7
zhuxun219:02:24

Reading your answer, what I realized is that "comp/get-query" should really mean "comp/get-the-ident-query-pair". Because that's what's really happening. The actual algebraic structure the normalization algorithm relies on is not the tree of queries, it's the tree of (ident, query) tuples.

👍 4
tony.kay21:02:53

that’s a good way of saying it