Answer the question
In order to leave comments, you need to log in
How to store business and accounting rules?
Here Uncle Bob (Martin) writes in his book about architecture that it is best for a program to rely on business rules that change least often. Looks like Uncle Bob didn't sniff our Central Bank.
Every year there are new requirements for financial and accounting. Tasks such as do A are constantly coming, if the count starts with X. A year later, it is required, "but that there should be 1 in the 13th position of the account." I've been drawing these squiggles around ones in the abacus and the like for years. Relying on this "business logic" is unrealistic. Something can be taken out in directories like X-> A, Y-> B. But then it is necessary to write the reference manual for EACH procedure. And then a new instruction will come and the manual will become useless.
How? How to store quirky ever-changing accounting rules and not turn your code into a clutter with a bunch of IFs, account masks, etc.
Answer the question
In order to leave comments, you need to log in
If I correctly understood that idea of Uncle Bob (I watched many of his speeches), then he means inversion of control .
But it seems to me that it is better to use functional programming. And how best to do the architecture of the application so that you can constantly change the rules without changing the rest of the code ... google Mark Bastian Bottom Up vs Top Down Design. Even if I'm completely wrong, I still recommend watching - a very inspiring video.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question