必赢亚洲手机app下载


文本生成器

找到的电脑软件

翻译:电脑软件wiki中的business logic词条

Business logic

工作逻辑

From Wikipedia, the free encyclopedia

根源Wikipedia,自由的百科全书

In computer software, business logic or domain logic is the part of the
program that encodes the real-world business rules that determine how
data can be created, displayed, stored, and changed. It is contrasted
with the remainder of the software which might be concerned with
lower-level details of managing a database or displaying the user
interface, system infrastructure, or generally connecting various parts
of the program.

在电脑软件中,业务逻辑或者领域逻辑是指程序的一片段:它对实事求是世界中的业务规则举行编码,来界定怎么着对数据开展创办、展现、保存和修改。与之相对的,软件的任何一些或者关切的是数据库的保管细节、显示用户界面、系统基础架构,或者哪些把系统的不一致部分连接起来。

Details and example

详情和范例

Business logic:

政工逻辑是指:

  • Prescribes how business objects interact with one another
  • 确定工作对象怎么着与另一个互相
  • Enforces the routes and the methods by which business objects are
    accessed and updated
  • 通过要被访问和改动的事情对象来指定路由和方法

Business rules:

作业规则是指:

  • Model real-life business objects (such as accounts, loan,
    itineraries, and inventories)
  • 对切实世界中的业务对象开展建模(比如账号、贷款、行程、库存等)

Business logic comprises:[1]
作业逻辑包涵:

  • Workflows that are the ordered tasks of passing documents or data
    from one participant (a person or a software system) to another.
  • 工作流,即一多级义务,它们把文档或数额从一个参加者(可以是人,也可以是软件系统)传递到另一个加入者。

Business logic should be distinguished from business rules.
[2]Business logic is that portion of an enterprise system that
determines how data is transformed or calculated, and how it is routed
to people or software (=workflow). Business rules are formal expressions
of business policy. Anything that is a process or procedure is business
logic, and anything that is not a process nor a procedure is a business
rule. Welcoming a new visitor is a process (workflow) consisting of
steps to be taken, whereas saying every new visitor must be welcomed is
a business rule. Further, business logic is procedural whereas business
rules are declarative. [3]

作业逻辑差别于业务规则。业务逻辑是一个店家系统的一有的,它控制数据如何被更换或总括,以及怎么着被传送给人或软件系统(等价于workflow)。业务规则则是工作政策的一组公式化表明式。所有拍卖或进度叫做业务逻辑,既非处理又非经过的称呼业务规则。欢迎新的访问者是一个进度(工作流),它由一文山会海步骤组成,反之,“必须让每个新的访问者都感到受欢迎”,那是工作规则。更明确的说:业务逻辑是进程性的,而事情规则是描述性的。

For example, an e-commerce website might allow visitors to add items to
a shopping cart, specify a shipping address, and supply payment
information. The business logic of the website might include workflow
such as:

例如一个电子商务网站可能同意访问者把东西添加到购物车中,指定一个发货地点,以及提供付款音讯。那个网站的业务逻辑可能包罗下列工作流:

  • The sequence of events that happens during checkout, for example a
    multi-page form which first asks for the shipping address, then for
    the billing address, next page will contain the payment method, and
    last page will show congratulations.
  • 在结账时期,下列事件体系将次第爆发:比如,一个多页面表单首先会问用户发货地址,然后问账单地址,下一个页面将包含支付办法,最后的页面将显得“恭喜购物成功”的音讯。

There will be also business rules of the website:

以此网站也席卷了一多元作业规则:

  • Adding an item more than once from the item description page
    increments the quantity for that item.
  • 从物品描述页很多次添加同一个物料,将追加那些物品的选购数量。
  • Specific formats that the visitor’s address, email address, and
    credit card information must follow.
  • 访问者地址、邮件地址和信用卡音信务必按指定的格式填写。
  • A specific communication protocol for talking to the credit card
    network
  • 和信用卡网络“对话”时务必拔取一定的广播发布协议。

The web site software also contains other code which is not considered
part of business logic nor business rules:

本条网站软件还包蕴别的代码,它们不属于业务逻辑或作业规则的一有的:

  • Peripheral content not related to the core business data, such as
    the HTML that defines the colors, appearance, background image, and
    navigational structure of the site
  • 与主旨工作数据非亲非故的次要内容,比如用来定义颜色、外观、背景图和网站导航结构的HTML
  • Generic error-handling code (e.g. which displays the HTTP Error Code
    500 page)
  • 通用的错误处理代码(比如显示一个HTTP的500荒唐)
  • Initialization code that runs when the web server starts up the
    site, which sets up the system
  • 网站服务器启动时期的先河化代码,它将率领系列
  • Monitoring infrastructure to make sure all the parts of the site are
    working properly (e.g. the billing system is available)
  • 用以监控的基础设备,用于确保网站的一一部分都在常规办事(比如账单系统有效)
  • Generic code for making network connections, transmitting objects to
    the database, parsing user input via HTTP POST events, etc.
  • 通用的网络连接代码、对象入库代码、通过HTTP的POST事件来分析用户输入的代码,等等。

Business logic and tiers/layers

政工逻辑和物理层/逻辑层

Business logic in theory occupies the middle tier of a 3-tier
architecture.

理论上,业务逻辑是三层架构中“中间层”的职务。

Business logic could be anywhere in a program. For example, given a
certain format for an address, a database table could be created which
has columns that correspond exactly to the fields specified in the
business logic, and type checks added to make sure that no invalid data
is added.

作业逻辑可以出现在程序中的任何地方。比如,给出一个指定的地方格式,一个和作业逻辑中指定的字段相平等的数据表可能被创建,并且参与了档次检查来确保参加的数目肯定有效。

(This section needs to be verified.)

(上面的一对须要更进一步表达。)

Business logic often changes. For example, the set of allowable address
formats might change when an online retailer starts shipping products to
a new country. Thus it is often seen as desirable to make the code that
implements the business logic relatively isolated, or loosely coupled.
This makes it more likely that changes to business logic will require a
small set of code changes, in only one part of the code. Distant but
strongly coupled code also creates more of a risk that the programmer
will only make some of the necessary changes and miss part of the
system, leading to incorrect operation.[4]

事情逻辑平常改变。比如,假使在线零售商开端扶助往一个新的国家发货,那么允许的地点格式就须求变更。能让贯彻工作逻辑的代码相对独立或者松耦合的方案,平日会看起来相比突出。那将使工作逻辑的生成只要求转移少量代码。不够显著的紧耦合代码将带动风险:程序员将只达成部分改动,而其余的一部分则被遗忘或略过了,这将促成错误的操作。

A multitier architecture formalizes this decoupling by creating a
business logic layer which is separate from other tiers or layers, such
as the data access layer or service layer. Each layer “knows” only a
minimal amount about the code in the other layers – just enough to
accomplish necessary tasks. For example, in a model–view–controller
paradigm, the controller and view layers, might be made as small as
possible, with all the business logic concentrated in the model. In the
e-commerce example, the controller determines the sequence of web pages
in the checkout sequence, and is also responsible for validating that
email, address, and payment information satisfy the business rules
(rather than leaving any of that up to the database itself or
lower-level database access code).

多层架构通过创建工作逻辑层来把这种解耦工作正式化,它将从其余逻辑层或物理层中分离出去,比如数据访问层或服务层。每一层只“知道”其他层的一小部分代码
——
只够完毕须要的劳作。比如,在一个MVC(model-view-controller)范式中,控制器和视图层被设计的尽心小,所有事务逻辑被含有在model中。在电子商务的例子中,控制器决定结账流程中的页面顺序,并且它也承受规矩业务规则对邮件地址、地址、支付音信举行求证,并付出回应(可是把此外的局地留住数据库本身和数量访问代码)

Alternative paradigms are possible. For example, with relatively simple
business entities, a generic view and controller could access database
objects which themselves contain all the relevant business logic about
what formats they accept and what changes are possible (known as the
database model)..

其它的范式也是可以的。比如,具有一个周旋简便易行的作业实体,一个通用的、能自己访问数据对象的视图和控制器,它们含有了拥有有关如何格式化所得到的多少以及允许做哪些改观(即数据模型)的事体逻辑……

Some tiered schemes use either a distinct application layer or a service
layer, or consider the business logic layer to be the same as one of
those.

一些其余的道岔方案可能选拔一个肯定的应用层、服务层,或把它们之一作为工作逻辑层。

电脑软件,Tools and techniques

工具和技艺

Business logic can be extracted from procedural code using a business
rule management system (BRMS).[5]

事务逻辑可以从进度化代码中经过作业规则管理连串(BRMS)提取出来。

The business rules approach of software development uses BRMSs and
enforces a very strong separation of business logic from other code.
User interface management systems are another technology used to enforce
a strong separation between business logic and other code. The magic
pushbutton is considered an “anti-pattern”: a technique that in this
case creates undesirable constraints which make it difficult to code
business logic in an easy-to-maintain way.

动用BRMS系统近似于针对工作规则进行软件开发,并且把事情逻辑和任何代码强力分离开。“用户界面管理序列”是另一种把作业逻辑和其余代码强力分离的技巧方案。“魔术推按钮”是一个反情势:在这种景况下,此技术创设了无法令人乐意的束缚,它不可以运用简单维护的办法来编排工作逻辑代码。

A domain model is an abstract representation of the data storage types
required by business rules.

领域模型是业务规则中所需的数码存储类型的肤浅意味。

相关文章

No Comments, Be The First!
近期评论
    功能
    网站地图xml地图