Fork me on GitHub
#polylith
<
2021-04-01
>
jjttjj19:04:33

slowly getting through the polylith docs/example, but in the meantime im curious how you would describe in polylith terms and "interface"/abstract component. IE I have several vendors I have to interact with that have either a websocket and/or REST api and I have protocols containing request! and send! methods.

tengstrand21:04:04

Hi @U064UGEUQ! You have two options, depending on the use case. 1. Create several components, e.g. vendor1 and vendor2 that implements the same interface`vendor`stored in e.g. namespace com.mycompany.vendor 2. Create one component e.g. vendor and keep the different implementations within that component in e.g. com.mycompany.vendor.vendor1and my.componay.vendor.vendor2. What is best depends a bit on the use case.

tengstrand05:04:40

If vendor1 and vendor1 is only used by vendor, then I probably would go for option 2 @U064UGEUQ and separate vendor1 and vendor2 as two “top” implementation namespaces within vendor.

jjttjj13:04:39

Thanks for the response! Going to take a closer look at polylith later today

👍 3