为什么我们需要业务逻辑层? [英] Why we need business logic layer?

查看:116
本文介绍了为什么我们需要业务逻辑层?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有明确的理由说明为什么我们需要业务逻辑层和数据逻辑

层而不是只有数据逻辑层。


Are有什么好的理由吗?

解决方案

当然,有很多原因。最重要的是,如果你的业务逻辑或数据逻辑发生了变化(一如既往地发生了b / b $ b),你可以只需要替换一层代码而不必打扰

另一个。


业务层是处理业务规则的地方,数据

层是你的数据所在操纵完成。将这些内容分开还可以为您的应用程序增加另一个级别的安全性。

MS newsgroup" < kl ** @jeromegroup.com写信息

新闻:el ************** @ TK2MSFTNGP02.phx.gbl ...
< blockquote class =post_quotes>
>我没有明确的理由说明为什么我们需要业务逻辑层和数据逻辑层而不是只有数据逻辑层。

有什么好的理由吗?



如果您正在构建一个应用程序来跟踪您的家里的CD收藏

那么你可以做任何你想做的事。


然而,在企业界,你已经分发了应用程序

对于性能,可维护性和可扩展性至关重要。

希望为您的系统采用一个好的设计模型。


传统上,路径是使用逻辑层(有时它们也是物理分离的物理分离)。


您应该使用
$进行逻辑分区(层)和设计b $ b interfac es作为图层之间的契约。这样做可以更容易地移动你的功能。所以,假设你有一个业务组件必须

做一些相当大的数学和很多CPU的能力,所以你想要利用你公司的优势
服务器是具有Duel Core

技术的肌肉机器,以及用于此类专长的大量RAM。它可以托管您的业务

组件。但是,如果它与您的数据访问紧密耦合

组件,则您无法做到这一点,因此它没有松散耦合,而且非常有效。
凝聚力。


如果你不在你的应用程序中应用逻辑层,它将导致难以维护,增强和扩展的单片应用程序。


维护将成为一个大问题,因为这样会很难确定你可能在一个中做出的任何改变或增强的效果

应用程序中其他组件的组件。


希望有所帮助。

-

-Demetri

" MS newsgroup"写道:


我没有明确的理由说明为什么我们需要业务逻辑层和数据逻辑

层而不是只有数据逻辑层。


有什么好的理由吗?


然而,

如果只有一个数据访问层,那么它不会担心其他的自动生成。

如果他们想要安全原因,可以使用storedprocedure轻松管理

很容易。


还有其他好的理由吗?


" Scott M." < s - *** @ nospam.nospamwrote in message

news:%2 **************** @ TK2MSFTNGP05.phx.gbl ...


当然,有很多原因。最重要的是,如果你的业务逻辑或数据逻辑发生了变化(一如既往地发生了b / b $ b),你可以只需要替换一层代码而不必打扰

另一个。


业务层是处理业务规则的地方,数据

层是你的数据所在操纵完成。将这些内容分开还可以为您的应用程序增加另一个级别的安全性。


MS newsgroup" < kl ** @jeromegroup.com写信息

新闻:el ************** @ TK2MSFTNGP02.phx.gbl ...
< blockquote class =post_quotes>
>>我没有明确的理由说明为什么我们需要业务逻辑层和数据逻辑层而不是只有数据逻辑层。

有什么好的理由吗?




I don''t have clear reasons why we need business logic layer and data logic
layer instead of having only data logic layer.

Are there any good reasons for that?

解决方案

Sure, there are plenty of reasons. The most important though is that if
anything about your business logic or your data logic changes (as always
happens), you can replace just one layer of code without having to disturb
the other.

The business layer is where your business rules are processed, the data
layer is where your data manipulation is done. Separating these also adds
another level of security to your applicaiton.
"MS newsgroup" <kl**@jeromegroup.comwrote in message
news:el**************@TK2MSFTNGP02.phx.gbl...

>I don''t have clear reasons why we need business logic layer and data logic
layer instead of having only data logic layer.

Are there any good reasons for that?



Well if you are building an application to track your CD collection at home
then you can do whatever you want.

However, in the corporate world where you have distributed applications that
are critical for performance, maintainability, and scaleability then you
would want to employ a good design model for your system.

Traditionally, the path is to use logical layers (sometimes they are
physical separations also).

You should shoot for logical partitioning (layers) and design using
interfaces as a contract between layers. Doing this will make it easier to
move your functionality. So, lets say you have a business component that must
do some pretty hefty math and lot''s of CPU power and so you want to take
advantage of your corporate server that is a muscle machine with Duel Core
technology and ton''s of RAM for such feats. It can host your business
component. However, if it was so tightly coupled with your data access
component you couldn''t do this, thus it is not loosely coupled and highly
cohesive.

If you don''t apply logical layers to your application it will result in
monolithic apps that are hard to maintain, make enhancements, and scale.

Maintenance would become a big problem because then it would be very hard to
size up the effect of any changes or enhancements you may make in one
component on the other components in the app.

Hope that helps.
--
-Demetri
"MS newsgroup" wrote:

I don''t have clear reasons why we need business logic layer and data logic
layer instead of having only data logic layer.

Are there any good reasons for that?


however,
if there is only one data access layer then, it doesn''t worry about other
lay automatically.
and if they want security reason it is managed easily using storedprocedure
easily.

are there any other good reasons?

"Scott M." <s-***@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...

Sure, there are plenty of reasons. The most important though is that if
anything about your business logic or your data logic changes (as always
happens), you can replace just one layer of code without having to disturb
the other.

The business layer is where your business rules are processed, the data
layer is where your data manipulation is done. Separating these also adds
another level of security to your applicaiton.
"MS newsgroup" <kl**@jeromegroup.comwrote in message
news:el**************@TK2MSFTNGP02.phx.gbl...

>>I don''t have clear reasons why we need business logic layer and data logic
layer instead of having only data logic layer.

Are there any good reasons for that?




这篇关于为什么我们需要业务逻辑层?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆