如何实现在C#3层建筑 [英] How to implement 3 tiers architecture in c#

查看:106
本文介绍了如何实现在C#3层建筑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看了很多文章谈到3层架构在C#中,但我看到:

I read many articles talk about 3 tiers architecture in c# but i see that:


  • 几乎用经营业务逻辑层(BLL)在相应的数据库表中的对象的映射。这BLL对象有一些方法这样的:

  • Almost use Bussiness Logic Layer(BLL) as a object mapping corresponding table in database. This BLL object has some methods like these:

+ 的GetData():返回此;

+ 更新(这一点);

+ 插入(本);

+ 删除(这);

这BLL对象调用相应DAL(数据访问层)来执行相应的数据库表。

This BLL object calls corresponding DAL(Data Access Layer) to execute to corresponding table of database.

推荐答案

以上描述了3层模型的一个非常简单的架构。

The above describe a very simple architecture of a 3-tier model.


  1. DAL(数据访问层)与数据库交互直接,所以所有的SQL操作正在内DAL只。
  2. 完成
  3. BLL(业务逻辑层)就像DAL和presentation轮胎之间的调停人。

  4. 没有直接的通信DAL和presentation层之间允许的。

  5. 虽然有实体层没有物理presence,但实体封装了所有的信息/数据,并从一层传递给它到其他。

  6. 因此,所有的数据库对象的名称和数据库架构被赋予了额外的安全层到应用里面DAL限制。

  7. 业务规则/逻辑正在里面BLL定义,任何更新的业务逻辑不会影响DAL和presentation层

此图描述实际实现的3层模型的。

This diagram describes an actual implementation of a 3-tier model.


  1. 数据访问服务和数据库服务器可以在单一服务器托管。

  2. 晴的SQL Server 2000/2005/2008或Oracle可以在Windows 2000/2003服务器上托管。

  3. 企业服务器通过Web服务/远程/ WCF。
  4. 公开所有操作
  5. 与Windows 2000/2003高度配置的服务器可用于托管业务服务,否则微软的BizTalk Server还可以用于此目的。

  6. presentation层或客户使用代理服务器通过HTTP,消耗在企业服务器暴露了服务://管道

  7. 客户端可以是任何独立计算机与应用程序被安装在桌面应用程序(赢表格或控制台应用程序),或有一个浏览器运行Web应用程序的情况下。

  8. 数据/信息正在由实体封装,并通过网络随后所有的网络协议从一个位置转移到另一个。

  1. Data Access Service and the Database Server can be hosted in single Server.
  2. Mostly SQL Server 2000/2005/2008 or Oracle can be hosted on Windows 2000/2003 Server.
  3. Business Server exposes all the operation through Web Service /Remoting/WCF.
  4. A highly configured server with Windows 2000/2003 can be used to host the Business Service, or else Microsoft BizTalk Server also can be used for this.
  5. Presentation Tier or the Client Consumes the Service exposed at Business Server by using the Proxy through http:// pipeline.
  6. Client can be any standalone machine with the application is being installed in case of Desktop Application (Win-Form or Console Application), or having a Browser to run Web Application.
  7. Data/Information are being encapsulated by entity and transferred from one location to another over network followed by all the network protocol.

这篇关于如何实现在C#3层建筑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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