I am maintaining software that is using if...else statement in Java in order to implement different business rules per user. I know that this is not the best way to implement such a requirement.
One idea that I have is to use Spring and use applicationContext.getBean("beanName" + user.getkey()). This would allow loading a bean dynamically at the point where differences may occur in the business logic. The only bad thing here is that the main code is tied to Spring which I really don't think is that big of a deal.
My question is could this be implemented with Drools, Mule, etc? I don't know either framework very well, but could use some advice on which avenue to pursue.
Thanks.
Aucun commentaire:
Enregistrer un commentaire