ArticleDirectory
- Layers vs. tiers
- How to select a tier? The general suggestions are as follows:
Layers vs. tiers
Layers refer to the logical division of components and functionality, and not to the physical location of Components in different servers or places. conversely, the term tiers refers to the physical distribution of components and functionality in separate servers, including the network topology and remote locations.
Layers is a logical division, while tiers is a physical division. The two are different.
Traditional N-layer architecture (logical)3-tier architecture (physical)
How to select a tier? The general suggestions are as follows:
Consider "2-tier" pattern if:
Web Application: the intention is to develop a typical web application, with the highest performance and no network security restrictions. if the intention is to increase scalability, the web server shoshould be cloned in multiple balanced servers.
Client-server application.The intention is to develop a client-server application that directly accesses a database server. this scenario is very different, since all the logical layers wocould be located at a Client Tier that in this case wocould be the client PC. this architecture is useful when there is a need for higher performance and quick access to the database, however, client-server ubuntures have scalability, maintenance and troubleshooting problems, since the entire business logic and data access are moved to one single tier which is the user's PC, and they are left at the mercy of the different executions of each end user. this case is not recommended in most situations.
Previous common C/SProgramThis type is basically used for development in the RAD environment.
Consider "3-tier" pattern if:
The intention is to develop a "3-tier" application with remote client running in the user client machine ("rich-client", Ria, Oba, etc .) and an application server with Web Services publishing the business logic.
All application servers can be located in the same network.
An application called "intranet" is being developed where the security requirements do not require the separation of the presentation layer from the business layers and data access.
The intention is to develop a typical web application with the maximum performance
Common forms
Consider "N-tier" pattern if:
There are security requirement demands where the business logic cannot be deployed in the perimeter network where the Presentation Layer servers are located.
There is a very heavy application code (it uses the server resources intensively) and to improve the scalability, such business component functionality is separated at other server levels.
Use of large projects
Detailed references:
. Net 4 N-layer architecture recommendation materials [dddd]
Http://www.cnblogs.com/2018/archive/2011/09/02/2163278.html