Answer the question
In order to leave comments, you need to log in
What is included in business logic?
What is included in the business logic on the frontend?
Sometimes I can’t determine whether to bring this or that function into a component or into services.
How to properly separate business logic.
PS also advise some kind of literature / article / lectures on how to do the architecture correctly and separate the code
Answer the question
In order to leave comments, you need to log in
If you describe the goals and processes of the project without mentioning how it is implemented in the code, then the business logic will remain. Everything else is infrastructure.
You can read this book
Vasily Ivanovich is a VIP client and receives a 5% discount
. A client who buys more than 500 rubles receives free delivery.
All this is business logic.
Even buy more than 10,000 and get a discount is also business logic.
The front, as well as the back, simply displays the changes, well, and slips Messages and flags.
Robert Martin wrote in Clean Architecture: “Strictly speaking, business rules are rules or procedures that make or save money. Strictly speaking, business rules are rules that make or save money, whether they exist or not. computer implementations They make or save money even when done by hand
The bank charges N% for a loan is a business rule that makes money for the bank It doesn't matter if there is a computer program that calculates the interest or an employee calculates it on the accounts. "
Read the book mentioned above if you haven't already.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question