This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-07
Channels
- # beginners (153)
- # cider (2)
- # cljs-dev (1)
- # cljsjs (11)
- # cljsrn (4)
- # clojure (21)
- # clojure-austin (2)
- # clojure-greece (1)
- # clojure-italy (8)
- # clojure-russia (12)
- # clojure-spec (68)
- # clojurescript (35)
- # cursive (4)
- # datomic (2)
- # fulcro (15)
- # off-topic (1)
- # om (1)
- # portkey (35)
- # protorepl (6)
- # re-frame (28)
- # shadow-cljs (13)
- # specter (10)
- # uncomplicate (3)
- # unrepl (7)
New snapshot of semantic wrappers. Some of them were missing due to a bug in my generators. I ported the HomePageLayout using it on another project, and it works well.
@tony.kay I think you're right, that should have been about bidirectional graph . I'm familiar with SQL and Datascript/Datomic and not so with om.next's database. I don't even know the right way to do that in om.next and the representation for the books:left_right_arrow:authors example above is SQL-ish
let's say that's what I would do in my SQL database, then how should I design my fulcro/om.next db with least duplication?
there will be no duplication. You just put your items in tables, and add edges. Nothing more to it
{:TABLE {ID { item-props :edge [:OTHER-TABLE ID] }}
:OTHER-TABLE {ID {item-props :edge [:TABLE ID]}}}
SQL databases are not graphs…you get a table based on a join, so the join really has no direction
in Om Next, the edges are simple data, and have a direction…so you need to explicitly point in both directions IF you need to navigate in both…but then the question is: do you really need to navigate in both? If so, then you need both edges…perhaps this is what you’re calling duplication
If the data is coming from a server, then you can also load the data in one direction with that use of it is on-screen, and re-load it with a diff query (in the other direction) later…that would end up building both edges; however, your mutations are still going to have to maintain the edges. One additional alternative: You can hack into the database query engine and implement your edge traversal (ala plain Om Next). Fulcro lets you do this selectively.
@rastandy custom types should work as opaque values, but not work as table entries queried and normalized with the query language and idents. The former are not manipulated, the latter are