Properties of 25 Appendix - hardcoded rules and business engine

  1. Properties
  2. History
  3. Community
  4. Source
content

Hard coded rules:

 

This section describes the disadvantages and advantages of hard coded rules. The points are taken into consideration about a needed decision.

 

(Dis) advantages

 

If the logic is hard-coded, there is no need for another external module to communicate with. This means that there are fewer dependencies to take into account making the system as a whole a bit less complex. The business logic layer however would grow larger and get more complex when choosing this strategy. By hard-coding the rules, we can assure that the necessary rules are always present.

 

A big disadvantage of a solution with hard-coded rule is the fact that it would accommodate very few possibilities for maintainability. These types of rules are generally not set in stone; initial values are estimated but may change over time when insights progress. A hard-coded solution is terrible for doing that, since the code has to be adapted every time a rule changes. In case of a system that runs in a compiled language, it also needs to be reset.


 

Business rules engines:

 

This section describes the disadvantages and advantages of the business rules engine. The points are taken into consideration about a needed decision.

 

(Dis) advantages

 

A business rules engine is a generic module that can depend on rules from an external source, such as a text file or database. This is much more straightforward then editing the source code every time a rule changes.

 

Anybody can edit a text file, or possibly use a UI to enter these rules but not everybody knows how to edit code. Also since these external files/databases need not compile it’s possible to adapt rules at runtime. Availability is not a major concern of the stakeholders, but it still reduces the amount of work that is needed which is something pointing out.

 

Another advantage of this solution is the fact that this is an industry-grade solution for a common problem. Rather than re-inventing the wheel, a solution like this can be used which is convenient not only because there is probably a lot information available about the specific system on the internet, but also because odds are that developers have at least heard of the technique.

 

A disadvantage is the fact that the introduction of an extra module makes the system as a whole a bit more complex. However, the code in the application itself can be kept a lot cleaner.

 

Conclusion:

 

The latter solution is more fit for the problem in our opinion, because of the straight-forwardness of rule adaption as well as the fact that it’s an industry-standard practice. The fact that it introduces a bit of complexity is not reason enough to discard the idea, especially since the alternative does the same in a different space.

contains knowledge about
Class
Name
25 Appendix - hardcoded rules and business engine

OntoWiki

Knowledge Bases

Login

  1. Local
  2. OpenID
  3. FOAF+SSL