- ASP.NET 3.5 Application Architecture and Design
- Vivek Thakur
- 296字
- 2021-05-28 17:47:12
Summary
In this chapter, we examined how web applications inherently follow a 3-tier client-server model, and how a 1-tier architecture can be used for simple applications in ASP.NET. Then we learned how we can logically partition this basic 1-tier 1-layer architectural style into two sub-layers, using code-behind files. We also studied how declarative code-less programming using new Data Source Controls follows a single-layer style.
In a nutshell:
- Classic inline coding should not be used unless absolutely necessary. One case supporting it would be a project that mixes classic ASP and ASP.NET, or a project already built using this style of coding.
- Data Source Controls (except Object Data Source) are only good for small projects which will never need to be scaled up in the future. For commercial-level projects, it's very important to logically break the code into layers.
- The code-behind style is much more flexible, object-oriented, and scalable for commercial projects. We can break these layers further, into more layers, for better code management and maintainability, as we will see in the coming chapters of this book.
We saw that although we have separated the HTML and code elements, all of the code is still in a single code-behind class (1-tier 1-layer style). For a decently-sized commercial application, having data access and business logic code in the same code-behind file is not a good practice, as code-behind belongs to the UI layer. For further loose coupling, the UI layer should handle only the UI events and should not contain data access or any business logic code. In the coming chapters, we will learn how to break up this 1-tier 1-layer architecture into an n-tier and n-layer architecture so that we can achieve a higher degree of loose coupling, and make our applications more scalable and robust.
- PrestaShop 1.3 Theming – Beginner’s Guide
- Getting Started with Microsoft Application Virtualization 4.6
- Learning VirtualDub: The complete guide to capturing, processing and encoding digital video
- 魔法詞典:AI繪畫關鍵詞圖鑒(Stable Diffusion版)
- 無師自通AutoCAD:中文版室內設計
- Ogre 3D 1.7 Beginner's Guide
- Stable Diffusion圖像與視頻生成入門教程
- PowerPoint 2013從新手到高手(超值版)
- 抖音+剪映+Premiere短視頻制作從新手到高手(第2版)
- 7小時精通剪映:短視頻剪輯/調色/特效/字幕(手機版+電腦版)
- 音樂制作7天速成:Cubase編曲教程
- 好用,Excel數據處理高手
- 中文版Photoshop 2023從入門到精通
- Photoshop CC新媒體圖形圖像設計與制作(全彩慕課版)
- 從零開始:Dreamweaver CS6中文版基礎培訓教程