3层架构中业务逻辑层的目的是什么? [英] what is the purpose of business logic layer in 3 tier architecture?

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

问题描述

3层架构中业务逻辑层的目的是什么?为什么我们在项目中创建图层需要什么分离?

what is the purpose of business logic layer in 3 tier architecture? why we make layers in projects what is the need of that separation?

推荐答案

首先让一些东西直接...

Layer - 它是应用程序设计中的一个逻辑逻辑组。

层 - 它是代码运行的物理位置。

你可以说层是这里的地方层已部署并运行。可以在同一层上运行多个不同的层,或在多个层上运行相同的层(负载平衡)。

现在我们在同一页面上,让我们看看你的问题...

应用程序设计与多个层的逻辑分离为您提供了灵活性。例如,如果您将UI与BLL分开,您将能够使用完全相同的BLL轻松添加不同设备(智能手机)的UI ...

它还可以让您移动具有很大的灵活性 - 作为使用您的应用程序的组织,您可以将您的一个层分隔到一个新层,并为整个系统提供更多功能......
First of all let straight some things...
Layer - it is a logical group of functionality inside your application design.
Tier - it is a physical location where the code run.
You can say that tier is the place where layers are deployed and run. It is possible to run several different layers on the same tier or run the same layer on several tiers (load balancing).
Now that we are on the same page let see your question...
The logical separation of your application design to several layers gives you flexibility. For example if you separated the UI from the BLL, you will be able to add UI for different device (smart phone) with ease using the exactly same BLL...
It also enables you to move your tiers around with great flexibility - as the organization using your application you may separate one of your layers to a new tier and give more power to the whole system...


仅举几例。 ...



方法的可用性 - 写一次并在需要的地方重复使用

更好的代码维护 - 最重要的方面形成未来的维护观点

如果将BL作为服务实现,它可以驻留在不同于UI的服务器上,并且可以被其他应用程序重用。例如,从公司ERP中检索客户信息可以在多个应用程序中使用。
To name a few ....

Re usability of the methods - Write once and reuse it where needed
Better code maintenance - Most important aspect form future maintenance point of view
If you implement BL as a service it can reside on different server than your UI and can be reused by other applications. For example retrieving customer information from corporate ERP can be used in multiple applications.


业务逻辑处理客户端请求。你需要分离的原因有很多。通过此模块化,您可以更改业务逻辑,而无需更改应用程序的客户端。
The business logic processes clients request. There are many reason you would need the seperation. This modularization allows you to make changes to your business logic without having to change the client-side of your application.


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

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