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).
业务逻辑基本上是根据功能规范制定的系统规则。例如,类型 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.
发布评论
评论(3)
假设您编写了一个可以解决客户业务需求的系统。
所有代码的总和就是应用程序逻辑或系统架构 - 基本上是您正在构建的整个系统。
业务逻辑是建模和驱动实际业务流程的代码子集。 “下了产品 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).
业务逻辑基本上是根据功能规范制定的系统规则。例如,类型 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.
它可能不是很准确,但我使用以下思维来确定它是应用程序、业务逻辑还是其他东西:
It might be not very accurate, but I use the following thinking to determine whether it's application, business logic or something else: