- Mastering JBoss Drools 6
- Mauricio Salatino Mariano De Maio Esteban Aliverti
- 388字
- 2021-07-09 19:58:41
When not to use a rule engine
Every project, in one way or another, can benefit from using business rules. They are highly performing, easy to change, and self-explanatory software components. However, there are a group of conditions that a project might have that would make use of business rules a bit of overkill. Some of the characteristics that make a project benefit the least from business rules are shown in the following:
- There are very few, self-contained rules involved in the project: If the business rules identified in the requirement gathering are very simple and span about one or two objects at most, we don't need a rule engine to run them. A good rule of thumb is that if we can write the business rules that we need as the pseudo code in less than a page and with less than two nested if-then clauses, we might not need a rule engine at this particular time.
- The business logic doesn't change often: If changing rules at runtime is not going to be needed but the logic is still complex, a rule engine might still be a good idea. However, if the complexity behind the rules is not that high and we can assume it will remain that way for a long time, we might not need a rule engine.
- A very strict control of the execution flow is crucial for the application: As we stated before, a sequence-flow control is not provided when we execute our business rules. If the business logic behind the business rules depends a lot on a strict set of steps that need to be executed sequentially, business rules might not be the right fit. However, if it does change frequently, perhaps a business process would be worth considering.
It is still a responsibility of the project team to determine whether business rules might be a good fit even if these conditions are met. After all, our experience can lead us to think that the amount of rules has a big chance of growing in the future or there might be situations where the rules will eventually need to change more frequently. Each project has its own unique characteristics and it might be that a project with no need for business rules right now cannot be thought without them in the future.
- 自動(dòng)化控制工程設(shè)計(jì)
- 自主研拋機(jī)器人技術(shù)
- 自動(dòng)生產(chǎn)線的拆裝與調(diào)試
- 機(jī)器學(xué)習(xí)流水線實(shí)戰(zhàn)
- PyTorch Deep Learning Hands-On
- 精通特征工程
- AI 3.0
- 網(wǎng)絡(luò)綜合布線設(shè)計(jì)與施工技術(shù)
- 軟件工程及實(shí)踐
- Spatial Analytics with ArcGIS
- 單片機(jī)原理實(shí)用教程
- Web璀璨:Silverlight應(yīng)用技術(shù)完全指南
- MPC5554/5553微處理器揭秘
- Mastering SQL Server 2014 Data Mining
- SQL語(yǔ)言與數(shù)據(jù)庫(kù)操作技術(shù)大全