Business Rules

Now, that we have created our business objects and their relationships, the next step is to define business rules that will govern the operation of the library application.

When defining business rules we should look at every business object in isolation and identify the rules according to which this object “lives”. It is important that we focus on a particular object and look at the world from this object’s point of view only. This means that we should not be too concerned with what is going on around this object in the system (see also Business Rules as Carriers of Business LogicBusiness Rules as Carriers of Business Logic and Configuration Guidelines).

Many objects follow a certain life cycle – they go through a sequence of states, each of them having a particular logical meaning. For example, a loan can be in “Current” or “Past” states. For objects with a well-defined life cycle most business rules identify which transitions from one state to the other are allowed and what happens with each transition.

Not all objects need to go through a sequence of states (or even have states for this matter). In our application we have both types of objects – objects with a life cycle (Loan, Reservation) and objects without it (Member, Item, ItemType1)).


1)
Although such objects as Member and Item have states most of the time these objects are in one state (“Active” for Member and “Released” for Item) so effectively we can say that they do not have a life cycle.
  • Last modified: 2022/12/15 05:05