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."

 

  

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

 

"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."

 

 

 
------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

你可能感兴趣的:(Web应用)