This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-03
Channels
- # announcements (1)
- # babashka (31)
- # bangalore-clj (3)
- # beginners (18)
- # bitcoin (2)
- # calva (14)
- # clj-kondo (37)
- # clojure (43)
- # clojure-europe (4)
- # clojurescript (24)
- # data-science (4)
- # datahike (1)
- # datascript (3)
- # datomic (1)
- # fulcro (16)
- # lsp (13)
- # malli (1)
- # meander (7)
- # off-topic (1)
- # polylith (12)
- # re-frame (7)
- # reitit (1)
- # rewrite-clj (46)
- # rum (4)
- # shadow-cljs (15)
- # specter (3)
- # sql (55)
- # tools-deps (20)
Hi! I take a look to polylith and I like it! I’m wondering if it’s possible to manage the UI too (with cljs of course) in the same `workspace` ?The Clojure(Script) ecosystem is awesome and typicaly we can share schema (spec, malli) between front and back. Is this possible?
▾ workspace
▾ components
▾ mycomponent
▾ src
interface.clj
core.clj
ui.cljs
▸ test
▸ resources
And add a new entry in the projects
folder.


Hi @UHZPYLPU1! I am currently working on a solution like that and am writing a blog post with an example code repo - but took a break for the easter holiday today 😄
Here’s my example repo, including Clojure, ClojureScript and cljc
code as the glue in between (I’ll also post a link to my blog post about it in the #news-and-articles channel)
https://github.com/DavidVujic/polylith-experiments
Nice!
ooooh well done @U018VMC8T0W !
Thank you @UHZPYLPU1!
Juste a little note. When a component
has Clojure (clj) code and ClojureScript (cljs) it’s maybe good to separate into a ui
namespace (or another name) like this:
▾ workspace
▾ components
▾ mycomponent
▾ src
interface.clj
core.clj
▾ ui
interface.cljs
▸ test
▸ resources
I don’t no if it’s a good or bad pattern but this allow to separate interface.clj
and interface.cljs
Good idea!
I guess it depends, maybe they could be two separate components?
You are mixing languages within the same component here + that it contains two separate interfaces also. My gut feeling says that the two “components” should be separated and live in two separate src
directories . The UI code could either live in its own src
directory, or together with other ui code, optionally in a separate base
which another team here did (we haven’t). But with that said, feel free to experiment @UHZPYLPU1!