DEV Community


Discussion on: We Should All Be Writing WET Code

darkwiiplayer profile image

Development by Slogan

I really like that phrasing. Thanks for sharing that article :D

I'll also use the chance to throw in a link to one of my favourite programming books: 97 things every programmer should know, thing 7: beware the share

peerreynders profile image

That particular piece is by Udi Dahan, Founder & CEO, Particular Software. The talks given by his employees can be interesting as well.

In particular finding your service boundaries comes to the conclusion that startups have difficulties identifying boundaries because their business rules aren't stable - which means that μservices are not a good fit in that situation.

And it's in bounded contexts (which is what microservices are all about) where naive application of DRY (or overzealous pursuit of reuse) can be counterproductive. Note that both the sales context and the support context have their own version of Customer and Product.

While sharing the same name these entities will likely have a very different shape inside each context as they support very different roles. Unifying them into one single entity would only increase coupling, undermining the autonomy of each context. Instead representations of Customer and Product that are shared between contexts are minimal - just enough information to correlate the support version with the sales version.

Forem Open with the Forem app