polylith

https://polylith.gitbook.io/ and https://github.com/polyfy/polylith
2021-04-01T19:48:33.488800Z

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.

tengstrand 2021-04-02T21:03:04.492900Z

Hi @jjttjj! 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.

tengstrand 2021-04-05T05:38:40.030800Z

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

2021-04-05T13:36:39.032600Z

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

1πŸ‘