Handling complex business logic without if-then-else
September 22, 2012 2:15 PM Subscribe
I'm working on a web app (PHP) that generates a personalized health guide based on a few user choices. The logic behind the generator is complex enough that if-then-else statements would get too nested, having too many conditions and difficult to maintain. I've been reading about rules engines, DSLs, karnaugh maps, finite-state machine, decision trees, rete networks and behavior trees. In addition to being utterly confused, I'm unsure which of these is the best approach for my app. Which one do you recommend?
posted by Foci for Analysis to computers & internet (4 answers total) 2 users marked this as a favorite
The guide focuses on a very narrow aspect of health so we're not talking about a super advanced expert system.
It's important that the logic can easily be modified because currently most of it is guesswork and will change a lot.