业务和应用逻辑?

发布于 2024-08-05 13:23:57 字数 1432 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

向日葵 2024-08-12 13:23:57

假设您编写了一个可以解决客户业务需求的系统。

所有代码的总和就是应用程序逻辑或系统架构 - 基本上是您正在构建的整个系统。

业务逻辑是建模和驱动实际业务流程的代码子集。 “下了产品 X 的订单后会发生什么?产品 Y 的成本是如何计算的?” IE。您可能需要客户/领域专家/项目利益相关者提供一些输入的代码位。

理想情况下,业务逻辑被分成自己的层(请参阅有关 N 层架构的 Wikipedia 文章)。其余代码通常可以简单地视为帮助业务逻辑执行的基础设施(数据库包装器、辅助函数、服务外观、外部集成、GUI 等)。

Say you write a system which solves a business need for a customer.

The sum of all your code is the application logic, or system architecture - basically the entirety of the system you're building.

The business logic is the code subset which models and drives actual business processes. "What happens when an order for Product X is placed? How is the cost of Product Y calculated?" Ie. the bits of code where you probably need some input from the customer/domain expert/project stakeholder.

Ideally, the business logic is separated into its own tier or layer (see the Wikipedia article on N-tier architecture). The rest of the code can often simply be thought of as infrastructure to help that business logic execute (database wrapper, helper functions, service facades, external integration, GUI, etc).

゛时过境迁 2024-08-12 13:23:57

业务逻辑基本上是根据功能规范制定的系统规则。例如,类型 B 的对象 A 必须具有属性 C 和 D,但不能具有属性 E。
应用程序逻辑更多的是一种技术规范,例如使用 Java servlet 和 OJB 来持久保存到 Oracle 数据库。
最后,这些是有助于描述应用程序中技术层次的流行语。希望努力将各个层分开,从而实现更好的应用程序设计。

Business logic is basically rules of the system according to functional specifications. For example Object A of type B must have attributed C and D, but not E.
Application Logic is more of a technical specification, like using Java servlets and OJB to persist to an Oracle database.
In the end, that are buzz words to help describe tiers of technology in an application. Hopefully in an effort to keep various tiers separated making a better application design.

苄①跕圉湢 2024-08-12 13:23:57

它可能不是很准确,但我使用以下思维来确定它是应用程序、业务逻辑还是其他东西:

流程图

It might be not very accurate, but I use the following thinking to determine whether it's application, business logic or something else:

flowchart

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文