Skip to main content
1 of 2
Chris
  • 177
  • 1
  • 9

What to do about complex business logic based on many options

I inherited a web application which has a lot of business logic lodged in the views. This logic controls page flow and control visualization. The gist of this logic is based on properties of a context such as: what state was the action taken, who is the client, what type of task, and many more. example of such logic:

if task.state == "WA" then goto view1
else if task.type == "Wash Windows" && task.clientid == 5 then goto windowWashview2 

feature requests come in all the time to add new tasks, with new rules. I've explored Domain Specific Languages briefly.

Any suggestions?

Chris
  • 177
  • 1
  • 9