Fork me on GitHub
#duct
<
2020-07-21
>
plins21:07:42

hey everyone, Im having a hard time on how to wrap my head around boundaries lets say I have a system that will make primarily http calls to other systems id like to create a protocol + record for some sort of HTTPService it to facilitate dependency injection, testing & etc is this a boundary HTTPService? Another services like the UserService will depend on that http service .. I know UserService should be a boundary, but it doesnt make sense for a boundary to depend on another right?

rickmoynihan12:07:51

Yeah, it only really makes sense if you need the decoupling. You’re already decoupling your app from the implementation of UserService so the HttpService within it is just an implementation detail and not something consumers of UserService will need to know about.

plins16:07:24

thanks for your input!

walterl22:07:26

@plins > but it doesnt make sense for a boundary to depend on another right I don't think there's an issue with that. The point is for the boundary interface to be implementation agnostic. So whether your UserService uses an HTTPService or a Shrubbery mock to do the "heavy lifting" shouldn't matter. From a slightly different angle, UserService could be your boundary, where HTTPService is a dependent component (not boundary) of an implementation of UserService. (Disclaimer: this is my interpretation of the goals of boundaries, as described at https://github.com/duct-framework/duct/wiki/Boundaries)

🙏 3