Member-only story

Let’s get WET & don’t DRY yourself

Colin But
4 min readJan 23, 2021

--

DRY

DRY (Don’t Repeat Yourself) is a software design best practice principle. It is considered a good principle to follow.

It is purely about avoiding code duplication where possible. i.e. don’t repeat your code.

On the other hand, the opposite of DRY is obviously WET — pun intended by the way. 😉

WET

WET (Write Everything Twice) is considered a bad principle. An anti-pattern.

In my opinion it totally makes sense if we’re developing ‘monolithic’ big applications.

Let’s say you have a business feature of managing users, their registrations, and their account management once registered.

In the old days of developing a “monolithic” application you would typically have maybe at the very least 3 interfaces/classes:

  • UserService

--

--

Colin But
Colin But

Written by Colin But

Writer sharing thoughts on pretty much everything. P.S. I’m a Coffee-Addict ☕ You can support me by buying me a coffee: https://bit.ly/3hQ5M63

No responses yet