Side effects of multiple If then else

Scenarios

In modern application development, writing code which is modular and simple is a greatly appreciated. But once it comes to handling business scenarios or handling scenarios where we have to perform decision making in the code, then we simple write IF THEN ELSE in code.

Lets put a utility code

Now, I know what you will say, let’s a add a helper method or a utility code which can do a decision making. Yes, I agree on this, but now this thinking is telling us that we are heading towards a design pattern where we do a decision making to handle appropriate flow.

What should I do then?

Hence, it makes sense to take a step back and see if we can simply write a strategy pattern code or some sort of template code which is doing decision making only at one place . Other parts of the code will use this code and no need to implement it on their end.

--

--

SE-Manager #Hiring #Mentorship #DEI #SoftwareDelivery #KPI #OKR #java-J2EE #Nodejs #GraphQl #Aws

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
abhinav singhal

SE-Manager #Hiring #Mentorship #DEI #SoftwareDelivery #KPI #OKR #java-J2EE #Nodejs #GraphQl #Aws