|
|
Advantages of Business Rules over codeFrom SmartEnoughWikiThere are a number of advantages gained by expressing business logic in business rules and using the processing and management facilities included with a Business Rules Management System to work with them. In brief summary:
Business rules syntax allows for a great deal of flexibility that you cannot replicate in traditional programming languages. Rules may be written with English phrases such as "If customer's age exceeds 65 then set customer's discount to .05". This type of familiarity lets business policymakers work side by side with the implementation team. Indeed, several of our customers have put business analysts through the rule writing course and had them writing rules, with no previous programming experience. Another key difference is that this approach "describes" each unit of logic independently in a business rule. Rules are precompiled into a decision structure that organizes condition combinations for very fast determination of all rules affected by a given set of condition values. A particular condition state is calculated only once, rather than in each separate "line of code" where it might appear in a traditional coding block. The sequencing work that would need to be planned by a coder in writing multiple possible execution threads is automated by the rule engine. As a result, the rule developer can focus on the "correctness" of each atomic piece of logic instead of the sequencing and nesting of if-then-else constructs. Business rule evaluations also persist during the execution process. This translates into faster execution when many rules apply to your application objects, as conditions (shared by many rules) are evaluated only once during the rule invocation or more precisely each time the value changes. Rule updates propagate to the relevant "nodes" in this decision structure, so the engine does not have to keep rechecking the conditions of every rule that has been defined. Rule templates give rule developers the ability to define specific structured types of rules or replaceable parts of existing rules that should be "exposed" to business level users for rule maintenance or creation. The product auto-generates rule maintenance application Web pages with links to the underlying rules so that business managers can make highly controlled and secure changes without ever seeing a word of the underlying rule syntax. Where appropriate, you can release the ownership of portions of the application business logic without running the risk of allowing unintended changes to other application code. This can greatly reduce costs in making incremental business changes to existing applications by taking the burden off programming departments having to work on maintenance releases. Because the rules are managed and executed as an independent process called upon by your application, they can be updated at any time without requiring recompiles, links, or processing interruptions to your production application. Rule logic can be tested off-line and then introduced into a running application according to your strategy (scheduled, automatic or manual updates). |