- ASP.NET 3.5 Application Architecture and Design
- Vivek Thakur
- 566字
- 2021-05-28 17:47:10
Default N-Tier Nature of Web Applications
When working with web applications, a very important concept to grasp is that by its very own nature each web application is distributed and is inherently 2-tier by default (or 3-tier if we include the database as a separate tier). Therefore, it is not possible to have a single-tier (or 1-tier) architecture at all, when dealing with web applications. And as we saw in the last chapter, if we include a database and client browser in our system, then we already have a basic 3-tier application structure.
Let's understand this concept in detail with a sample configuration for a simple ASP.NET web application:
- Web Server: A machine running a web server such as IIS, handling all HTTP requests and passing them onto the ASP.NET runtime process. The deployed project files (
ASPX, ASCX, DLLs
etc) are published on this server. - Database Server: This will be the physical database such as SQL Server, Oracle and so on. It can be on the same machine as the web server or on a separate machine.
- Client Browser: This will be the browser that the client is running to view the web application. The browser runs and uses client machine resources.
The example shows a deployment scenario, where we have the web application deployed on machine A, which is running IIS.
This is how the configuration will look:

Based on the above diagram, we have a distributed 3-tier architecture with the following tiers:
- Presentation Tier: This is the client browser displaying rendered HTML from the web server.
- Application Tier: This is machine A, which has the web server running along with the application's UI, business logic, and data access code, all deployed together on the same machine.
- Data Tier: This is the database running on machine B. We can also call this a Data Layer.
An important point to note is that in ASP.NET web applications, the presentation tier (browser) is different from the GUI (which is actually the ASPX/ASCX application frontend).
In this chapter, in order to simplify the understanding of application architecture, we will be considering tiers from the application's stand point and therefore ignoring the database (data tier) and client browser (presentation tier). So a single ASP.NET web application, in monolithic terms, is 1-tier. We will see how to break this 1-tier 1-layer web application further into layers and tiers, understanding and analyzing the needs and effects of each step.
Usually, it takes a lot of experience working with different types of architectures to become familiar with the advantages and disadvantages of each approach. A developer who has worked only in 3-tier (or higher) applications may find it very difficult to conceptualize and adapt to a 2-tier approach even though it may be more suitable for his project. He will feel more comfortable in the n-tier based architecture even when it is not required. That is why it is very important to study the 1-tier and 2-tier designs and analyze their pros and cons, to appreciate the usefulness and the real need of breaking it further into multiple tiers and layers.
In this chapter, we will focus on how to break the monolithic default ASP.NET architecture into multiple layers and tiers and see when and where to use this style. We will also see how we can logically break the 2-tier style into different layers for more flexibility and better code management.
- 社會科學數據處理軟件應用
- 數據、模型與決策:基于Excel的建模和商務應用
- Creo 4.0中文版從入門到精通
- Python 2.6 Graphics Cookbook
- 中文版Maya 2022完全自學教程
- 下一代空間計算:AR與VR創新理論與實踐
- 板繪教室:SAI零基礎日系動漫插畫入門教程
- Vivado從此開始(進階篇)
- Vue.js快速入門
- Java EE 6 with GlassFish 3 Application Server
- After Effects 2022從入門到精通
- 中文版3ds Max 2022基礎教程
- 中文版Illustrator CS6基礎培訓教程(第2版)
- 五筆打字全能一本通(全彩版)
- Illustrator CC平面設計應用教程