Drools optimiza el codigo

Just ask yourself a few questions about the above spaghetti code:

  • After a small change in this code, does the application work without recompilation/redeploying?
  • Do you want to be the person who has to maintain this code?
  • Supposing that this code is getting bigger and bigger, can you easily test it and be sure that it is correct?
  • Are you ready to rewrite everything from scratch when you add new rules or different dependencies?
  • After a few months, will you recognize and understand the meaning of this code?

If you answered no more than you answered yes, keep reading to find how to turning those no’s into yeses. The solution is Drools, a Java rule engine framework for organizing business logic. Drools allows you to focus on things that are known to be true, rather than on making decisions about low-level mechanics. Using this framework, you will be able to transform the above code into something readable, verifiable, reusable, configurable, scalable, and flexible.


Etiquetas: , ,