WEB应用程序: N-Tier vs. N-Layer

 "N-Tier is more about where the code / processes run, and N-Layer is more about how the code is logically grouped."

 

 "In the picture below,...The browser, IIS, and Database all run on 3 separate physical machines, each separated by a network."

 

  

3-tires-example.JPG

 

"Layers (N-Layer) are more about how you organize your code.   To make your applications more maintainable and extensible, you will want to divide your applications into highly cohesive (High Cohesion GRASP Pattern), loosely coupled (Low Coupling GRASP Pattern) areas of interest, which I call layers.  The picture below is an example of a layering approach that follows the Domain-Driven Design patterns."

 

layeredapplications.jpg

 

 
------Web Applications: N-Tier vs. N-Layer - Benefits and Trade-Offs From:http://davidhayden.com, Author: David Hayden

 

"N-tier architectures divide code into physical tiers to promote code-reuse. "

 

"N-layer architectures organize code into logical modules to promote code-reuse and minimize failure points."

 

 "N-tier is a phrase most seasoned developers have heard, but it has multiple meanings depending on to whom you talk. In this article I'll define n-tier as, a software architecture methodology that defines distinct physical or process boundaries between application modules.N-tier architectures typically break down tiers into presentation, business, and data tiers, although other tiers and patterns may certainly be used."

 

"N-tier architectures have several advantages, including better code re-use, easier maintenance, enhanced scalability, and fault isolation. However, there are disadvantages as well, such as additional failure points in the application and added complexity as code makes calls between multiple machines on the network. "

 

 "While the term n-tier is certainly relevant for many applications, I prefer to minimize failure points as much as possible and keep things simple. As a result, I subscribe to the n-layer approach, where code is divided into distinct layers (presentation, business, and data for example), but is not separated by physical or process boundaries unless absolutely necessary. Doing this keeps things simple and preserves the principles of code-reuse, easier maintenance, and so on."

 

"There are two main ways to create n-layer applications using Visual Studio .NET 2005 and ASP.NET 2.0 (see Figure 3). The first involves the App_Code folder available in ASP.NET 2.0. The code-behind files in the Web site contain the presentation logic; the business and data classes are placed in App_Code."

 

------The Stratifier Layering ASP.NET Application Code By Dan Wahlin

转载于:https://www.cnblogs.com/elock/archive/2009/12/08/1619370.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值