What is domain logic?

后端 未结 9 1751
时光取名叫无心
时光取名叫无心 2021-01-30 09:03

What is domain logic? The Wikipedia page for domain logic redirects to business logic. Are they the same thing, and, if not, how do they differ?

9条回答
  •  遥遥无期
    2021-01-30 09:22

    Domain logic applies to the problem domain, e.g. "order processing". Domain logic is about the entities you work with (the object model), and their relationships.

    Business logic contains rules specific to your context, e.g. "orders from customers of group X are to be processed using discount Y when exceeding amount Z". Business "logic" is about encoding facts about your business (or the business of the customer who uses the program).

提交回复
热议问题