|
|
|
|
|
by joshdick
3354 days ago
|
|
Sharing a framework for logging, routing, and other boring things is fine; sharing a framework with domain-specific logic is when you start getting into trouble. Now if you want to change something in that framework, you have to change and deploy every last one of your services. |
|
Isn't that just called a business requirement?
> you have to change and deploy every last one of your services.
How is that different to code duplication as the article recommends? When business requirements change all affected code points needs to change.. you can't just wish that away.
-
The real problem here is mismanaging seperation of concerns.
Cqs mostly solves the hard problems. But having shared read objects will, at times, require multiple systems to make use of the same domain logic. Whether you're better off with code duplication or a hard shared dep is a trade off up to you to figure out. I tend to go with a mix that makes sense based on expected frequency of change and how breaking the changes are likely to be.
Another microservices is also one answer but can be an unworkable bottleneck for a lot of these types of situations.