Fork me on GitHub
#polylith
<
2023-08-24
>
jasonjckn05:08:36

What would I be loosing if I don't follow adopt interface namespace design pattern, in terms features polylith provides, never mind the philosophical implications. The rest of polylith will work without that generally ok? I'm still creating components, its just they're going to have larger surface area than 1 namespace.

furkan3ayraktar05:08:24

You can split interfaces into multiple namespaces. You need to follow the your.top.ns.component-name.interface.XX pattern, where XX is any namespace name you want. See https://polylith.gitbook.io/poly/architecture/interface for an example. Polylith also allows you to modify interface into something else. interface is the default but you can override it in your workspace.edn.See :interface-ns https://polylith.gitbook.io/poly/workflow/configuration.

👍 2
jasonjckn05:08:21

Oh, ok missed that part, thank you! That makes me reconsider perhaps... i'll reconsider. But i'd still be interested in the answer to my original question, on what you loose.

furkan3ayraktar06:08:15

You wouldn’t loose anything if you use multiple interface namespaces. I would recommend that if you have a large component or if you’d like to split different responsibilities of the component. If you use another namespace other than interface, again from the tools perspective, you would not loose anything; everything will work. Maybe one downside is, it’s easier to follow the documentation if you see interface mentioned there and you look at the code and see interfaces. It could be easier for people familiar with Polylith and joining your project, etc.

👍 2
🙌 2
tengstrand06:08:16

If you want to mix both interface and ifc at the same time, then an alternative is to work from the master branch. If you update the :sha in the :poly alias in ./deps.edn to the latest SHA in the master branch (right now 48d8a14d31a02cd2229d99bca094fe383d3dcace ) and e.g. start a shell with clojure -M:poly then that will work. This will be included in the next 0.2.18 release.

👍 2