This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-10
Channels
- # aleph (4)
- # aws (2)
- # bangalore-clj (2)
- # beginners (84)
- # boot (25)
- # cider (3)
- # cljsrn (3)
- # clojure (57)
- # clojure-italy (5)
- # clojure-losangeles (3)
- # clojure-russia (7)
- # clojure-spec (18)
- # clojure-uk (29)
- # clojurescript (90)
- # cursive (11)
- # data-science (68)
- # datascript (2)
- # datomic (25)
- # duct (3)
- # fulcro (13)
- # graphql (7)
- # immutant (1)
- # jobs (1)
- # leiningen (12)
- # lumo (1)
- # off-topic (51)
- # om (43)
- # onyx (15)
- # parinfer (10)
- # pedestal (4)
- # re-frame (7)
- # reagent (42)
- # ring-swagger (42)
- # rum (1)
- # shadow-cljs (172)
- # spacemacs (10)
- # specter (4)
- # sql (4)
- # test-check (19)
- # unrepl (54)
- # yada (3)
Hi im trying to set up om next with a remote api backed by datomic in a way where i can run the same datalog queries in the browser or on the server. Somehow i got the impression that this would be possible and is even an intended use case thanks to datalog. Its a beautiful idea im just struggling to get it working in the real world. Has anyone done this? Also could anyone point me to some publicly accessible sample code?
I've been using Om Now on an enterprise project for three years. Now evaluating more modern tools for migration/updating of the project, including reagent, reframe, Om next and rum. Can anyone comment on why you chose Om Next as your library for React?
@ajs the model is very simple, and imo rather elegant. i also found it pretty easy to learn. Fulcro (https://fulcrologic.github.io/fulcro ; based on Om Next) is fantastic as well
reagent/re-frame are easier for sure (hence their popularity), but om next is simpler
if you haven't seen this yet: https://www.infoq.com/presentations/Simple-Made-Easy i highly recommend it
it's rich hickey's best talk imo, and it's a big part of the reason i decided to learn clojure
om next is rather more opinionated, and thus not as familiar. so there is that initial leap, which makes it less easy
Haven't read the fulcro docs yet but I went thru the Om Next tutorial and it seemed straightforward, yet I read that fulcro adds the missing pieces. What would this missing pieces be?
om next is a bit low-level and customisable, which means there is quite a lot of boilerplate and plumbing required to use it directly. fulcro makes a lot of decisions for you, and removes that boilerplate/plumbing
fulcro also provides things like routing, networking, colocated initial state, colocated css, and i18n for you
In reagent I don't like that there is a lot of implicit ambiguity. I think Om Next follows Om Now in being explicit? In reagent, an argument can be a prop, or a child, or neither, just a fn arg for other purposes. I suppose at run time reagent is having to always figure out how to treat args.
One thing I like about reagent/reframe is that if two or more components need the results of the same query or calculation, it is only done once and then delivered multiple times. Haven't poured enough into Om Next queries to know if something similar happens there.
I'm guessing not since queries are mainly just a way to access data but calculations would be separate from that.
yep that is how om next queries and mutations work too, if i understand you correctly
Why is increment in parens here, from the Om getting started: (om.next/transact! reconciler '[(increment)])
@ajs that is just how transactions look. you can also pass them params like '[(mutate {:a 1}) (other-mutate {:b 2})]
there is a full explanation of query syntax here: https://fulcrologic.github.io/fulcro/guide.html#!/fulcro_devguide.D_Queries
@ajs and here is the doc on mutations: https://fulcrologic.github.io/fulcro/guide.html#!/fulcro_devguide.G_Mutation