fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
Henry 2021-05-02T04:39:42.298Z

@holyjak Maybe a gentle deployment guide for Fulcro would be helpful, especially for beginners coming from the JS ecosystem who are not familiar with Java's way of making a jar and serving it to the real web beyond localhost. Although this deployment knowledge is general, assumed to be "common sense" and not particular to Fulcro, for many such beginners (including myself), Fulcro is probably where they learn all about Clojure's way of web development. If people can not only run fulcro-template and fulcro-rad-demo, but also manage to deploy them (e.g. to heroku) and see the demo live, it will help them get the full picture of Fulcro's power and perhaps the additional motivation to commit into grokking Fulcro despite the learning curve. Thank you very much for your excellent contributions in building and expanding the Fulcro community.

1👍
Gerome 2021-05-02T12:18:29.298300Z

@holyjak What I struggle with in particular is how to put, say, an entire list of persons into the DB in your tutorial setup. It seems like merge-component is the solution here, but I can't do that in a mutation since it would create circular dependencies (the function requires the app and the component, the latter requires the mutation and now I'm in trouble, it seems). In my specific case, I upload a CSV into the browser. I turn it into a list of maps and now I want to somehow put it into my database. I could use swap! however, that also means that I have to manually do all the stuff that, I thought, fulcro takes care of, or am I completely on the wrong path?

Gerome 2021-05-02T12:39:58.298500Z

Reading your tutorial, it seems load! might be the right tool...

Jakub Holý 2021-05-02T12:48:32.298700Z

Load is the tool if the data is provided by a remote api. For the circular dependency there is a solution too, in the components namespace there are maps, functions to go from :my.ns/MyComponent to the component class. See https://book.fulcrologic.com/#CircularRefs

Gerome 2021-05-02T12:53:54.298900Z

Ooooh, the action has the component and application on the :env map!

Jakub Holý 2021-05-02T13:12:43.299200Z

@hk9861 https://chrisodonnell.dev/posts/giftlist/deployment/?

Jakub Holý 2021-05-02T13:24:03.299400Z

Also in a mutation don't use merge-component! but merge-component

1👍
2021-05-02T23:35:11.301Z

Has anyone tried running fulcro in self-hosted clojurescript? The motivation is a web-hosted playground to try out fulcro - for example, could make the fulcro dev guide examples live and editable

Jakub Holý 2021-05-03T13:59:53.301800Z

Discussed before. I think it's complicated due to the macros added for Server side rendering support. Would be great if someone tried to do it (again?)

2021-05-03T14:02:16.302Z

Thanks for the info - another thought I had was extracting a subset of fulcro that would work in self-host - maybe the 3.5 raw ns?

Jakub Holý 2021-05-03T15:14:22.302200Z

No idea. But just try it and see. Perhaps excluding some ns would be easiest way forward...

tony.kay 2021-05-03T15:55:16.302400Z

not going to be easy

wilkerlucio 2021-05-05T04:08:49.309600Z

I think and easier path is to use standard cljs, and make extensions using SCI, this way you can allow user code to use the things already compiled from cljs

wilkerlucio 2021-05-05T04:10:00.309900Z

https://github.com/borkdude/sci

Jakub Holý 2021-05-06T22:00:15.318500Z

I'm sorry, I do not get it, how does Sci help run Fulcro Clojure macros in pure cljs?