Re:Using Clojure for Web Apps
by knubie on Thursday December 12, 2019 @11:21AM
(#21773210)
What I'd really like to see is a full stack clojurescript framework like next.js or meteor. I think fulcro comes close but it uses JVM clojure on the server side, so it's not entirely possible to re-use code on either end.
[ Parent
| on HN ]
Re:Using Clojure for Web Apps
by dantiberian on Thursday December 12, 2019 @12:57PM
(#21774348)
> I think fulcro comes close but it uses JVM clojure on the server side, so it's not entirely possible to re-use code on either end.
You can reuse an awful lot of code between Clojure and ClojureScript using cljc files. In my experience it is rare to have code that you want to reuse between the browser and server that you can't make portable.
The vast majority of business logic code is portable between Clojure and Clojurescript, and the cljc file extension allows the same source files to be used on JVM or in the browser.
Even asynchronous code with core.async is portable! In browser, it will be single threaded while on JVM it will be multithreaded, without any extra work from you.
Re:Using Clojure for Web Apps
by fnordsensei on Thursday December 12, 2019 @12:37PM
(#21774104)
I don’t think Fulcro knows how it is being served. I don’t see why you couldn’t serve it from Node if that’s your thing.
Re:Using Clojure for Web Apps
by currentoor on Thursday December 12, 2019 @05:56PM
(#21777530)
There are several commercial users of Fulcro using Node JS on the backend. I am one of them.