This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-04
Channels
- # adventofcode (171)
- # beginners (160)
- # boot (13)
- # chestnut (2)
- # cider (6)
- # cljs-dev (15)
- # cljsjs (35)
- # cljsrn (1)
- # clojure (139)
- # clojure-argentina (3)
- # clojure-brasil (1)
- # clojure-greece (31)
- # clojure-italy (5)
- # clojure-russia (5)
- # clojure-spec (18)
- # clojure-uk (11)
- # clojurescript (42)
- # clojurex (6)
- # core-async (12)
- # cursive (14)
- # dirac (13)
- # emacs (13)
- # events (1)
- # fulcro (46)
- # graphql (7)
- # leiningen (10)
- # lumo (3)
- # mount (31)
- # off-topic (20)
- # onyx (30)
- # perun (4)
- # planck (47)
- # re-frame (28)
- # reagent (14)
- # ring (5)
- # shadow-cljs (3)
- # spacemacs (7)
- # specter (13)
- # timbre (3)
- # unrepl (65)
- # yada (8)
Apologies if this is a stupid/well documented question, but is it possible (and sensible) to use Fulcro just on the client side? How easy is it to change the communication to talk with a REST or GraphQL API? Or how hard would it be to produce the Datomic-like communication on the server using C# or PHP for example?
you can write your own networking implementation
@bunkers in https://github.com/fulcrologic/fulcro/blob/master/src/main/fulcro/client/network.cljc you have protocols you need to implement and the default implementation
IXhrIOCallbacks
is not needed, you can use a different client
for doing actual http requests
Cool thanks! So it’s about creating a FulcroNetwork
object, that does the work of reading and writing the transit? Might be easier for me to implement the server logic using transit. I’m just not sure how tricky that will be yet. I assume all the logic for paging and caching can be left on the client side?
@bunkers still experimental, but I had success connecting fulcro with a GraphQL api directly
missing docs, but you can find it around here: https://github.com/wilkerlucio/pathom/blob/master/src/com/wsscode/pathom/fulcro/network.cljs#L173-L184
but there in example using here: https://github.com/wilkerlucio/wssblog/blob/master/src/com/wsscode/blog/demos/contacts.cljs
@tony.kay I'm not seeing the :set
operation on the integrate-ident
https://github.com/fulcrologic/fulcro/blob/master/src/main/fulcro/client/primitives.cljc#L3162-L3202
great thanks for that @wilkerlucio. Looks very useful! I can’t see that example though. Is it a private repo?
@bunkers sorry, you are right, that repo is closed, I exported the relevant file in a gist here: https://gist.github.com/wilkerlucio/cda2bf4a3c4c05a0ffec49cdb1eed93b
no problem 🙂
@bunkers look at the GettingStarted.adoc in the repo…it has a simple REST example at the end
@bunkers but try it out full-stack with clojure/clojurescript as well..just to compare. I think you might find some compelling reasons to try to pursuade others to use clj on the back end 😉
There's a lot of great information at the fulcrologic site, and I find myself referencing it a lot, particularly as I'm getting into front end work again. Minor annoyance: https://fulcrologic.github.io 404s. The proper site is https://fulcrologic.github.io/fulcro/ Is the a reason the domain root doesn't redirect? Or that the site doesn't exist at the domain root?
@grzm I had not noticed that….it’s a github pages thing…I’ll check into it. I own a domain name now, so I should just host the thing myself 😜
Yeah, I was just seeing that. Looks like you might just need a http://fulcrologic.github.io project?
I’m considering dropping the children
argument to defsc. The CSS stuff is more important, I don’t like the arg shifting, and it is easy to use let
and prim/children
to get the children. This is a change for 2.0 that will possibly affect porting from 1.x. Anyone object??
I agree :thumbsup:
missing blog post from the site: http://fulcro.fulcrologic.com/fulcro/shadow/dom/2017/10/26/shadow-dom.html
also the evaluation worksheet still references untangled. Is there a better place to note these things? I don't want to clog up the slack or look like all I'm doing is nit-picking
@tony.kay we haven’t used defsc
yet, so this shouldn’t affect us right?
BTW most of the time you won't even put children in a let but just put the call somewhere in the component. There is not a whole lot you can do with them