什么是领域逻辑?[英] What is domain logic?

本文是小编为大家收集整理的关于什么是领域逻辑?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

是什么域逻辑?域逻辑的维基百科页面重定向到业务逻辑.它们是同一件事,如果没有,它们如何不同?

推荐答案

域是您在建模的内容.

如果您正在建模业务问题,它们是相同的.

如果您正在建模其他内容,例如,您的系统中可能没有业务逻辑,但物理部分仍然是域逻辑.

其他推荐答案

域是世界您的申请生活中的世界.因此,如果您正在处理飞行预订系统,应用程序域将是航班预订.

另一方面的业务逻辑是整个应用程序域的更多离散块.业务逻辑通常是用于执行一个特定业务流程的代码部分.所以你会有业务逻辑来预订.另一个商业逻辑将是退款取消票证的代码.

支持您的业务流程的对象然后成为您的业务对象!

其他推荐答案

业务逻辑是外部的(关注如何实现目标),而域逻辑是本体论(存在的是什么,或用于推理的物体模型)

本文地址:https://www.itbaoku.cn/post/627373.html

问题描述

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?

推荐答案

The domain is what you are modelling.

If you are modelling a business problem, they are the same thing.

If you are modelling something else, physics for instance, there is probably no business logic in your system, but the physics parts are still domain logic.

其他推荐答案

Domain is the world your application lives in. So if you are working on say a flight reservation system, the application domain would be flight reservations.

Business Logic on the other hand is a more discrete block of the entire Application Domain. Business Logic is usually a section of code built to perform one specific business process. So you would have business logic to take a reservation. Another bit of business logic would be code to refund cancelled tickets.

The objects that support your business process then become your business objects!

其他推荐答案

Business logic is teleological (concerned with how to achieve an objective) while domain logic is ontological (what exists, or the object model that's used to reason with)