Well-written multitier applications consist of multiple layers. The most widespread three-tier architecture divides our code into a presentation, business and data access tiers. Like it or not, but the business layer is where we, developers, spend the most time on a daily basis. This is the place where all processes and decisions our application depends on take place. Therefore, requirements for the business layer change more often than in any other layer. What hurts us, developers, most is that with every change, even the smallest ones, we need to recompile and rebuild our app. It usually takes a piece of the valuable time that we could use for more interesting things. What if we could move a business logic out of our code and let non-technician people change it?

In this article, we will show how to move a business logic out of our code using a business rules engine called Hyperon. Firstly, we will create a simple Spring boot application that shows which Train ticket should be presented based on input data. Whole business logic will be placed inside the app in its code. Secondly, we will move that logic out in a form of decision tables using the Hyperon engine. Lastly, we will discuss the advantages and disadvantages of the decision tables and rules engine.

#software-engineering #java #code-quality #business-process #hyperon #management #product-management #rest-api

Move Business Logic out of Application Using Hyperon Engine
1.35 GEEK