Kristaps Vītoliņš
1 min readFeb 11, 2019

--

Good to hear your opinion and if you look even more around you will find this https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

It is a masterpiece of engineering =)), I suggest you watch Kevlin Henney talk about it https://www.youtube.com/watch?v=LueeMTTDePg

But to answer your question

“ what actually is that thing” https://olvlvl.com/2018-04-command-dispatcher-pattern

I do realize this always will put people into two groups when I speak about ifs

No — it is over engineered
Yes — this makes sense

And that is fine, Common Sense isn’t canceled. And when you design your solution that has to be kept in mind and not to over-engineer it.

I just can’t agree on this

if
— if
— — if
— — — if

— —


this just shows code have clear problems with separations of concerns and upkeep the Christmas tree will cost you a lot of headaches as that tree just tends to grow and grow and creep inside other methods, sub-methods and suddenly you are landed in one big bowl of mud.

Command dispatcher patter isn’t a silver bullet, it is just one way of making your daily life better.

If you are really interested in this topic, here is good youtube video about ifs https://www.youtube.com/watch?v=4F72VULWFvc

Cheers,
K.

--

--

Kristaps Vītoliņš
Kristaps Vītoliņš

Written by Kristaps Vītoliņš

I’m a Software engineer, dad, and husband. Innovation as a service.

Responses (1)