Pages

July 9, 2008

Drools, You Found Me Too Late!!!

Tonight I went to my local Java User Group meeting and the topic was the use of Rules Engines to handle business rules execution, more specifically Drools. Well as I sat there and saw how simple it was to move the business rules out of the main program logic and pass the buck to the engine I had a flashback to my senior design class in undergrad.

My senior design project was a baby monitoring device that extended on the popular Angel Care baby monitor. We added the ability to stream audio and video from the baby to any computer on the local network in addition to the lack of breathing/movement alerts the monitor sends. Well as you can imagine, there were all kinds of if/else statement logic throughout the code to handle the many different scenarios. Basically, our code was ugly and hard to read. If we had been able to use an engine like Drools we could have moved all this logic into external rule files and loaded them in at run time and had nice, readable source code. Also, it would have been a lot easier to update the rules when we found errors (of course we found tons... it was our first real hardware/software engineering adventure after all).

So I will be adding Drools to my list of things to research and learn. I am already envisioning a use for it on the job if I can get enough people to buy in and get on the band wagon.

No comments:

Post a Comment