官术网_书友最值得收藏!

Single Tier—Three Layer Model

In this model, we logically break BL and DAL in different namespaces, introducing cleaner code separation.

ASP.NET Web Project that has logical separation between presentation, business logic and data access code:

  • All presentation code will be under the MyApp.Web namespace (Layer 1).
  • Furthermore, the single project can have two folders:
    • Business (Layer 2): for business logic code, with namespace MyApp.Code.Business
    • DAL (Layer 3): for data access code, with namespace MyApp.Code.DAL

Note that it is not necessary to have different folders for the logical separation of code; using different namespaces in different code files will also work fine. We can use this model for a medium-to-large web application where we know that many users won't log in simultaneously. For handling a large number of users, the application needs to be scalable, and to do this we might need to separate BL and DAL code into their own physical assemblies.

主站蜘蛛池模板: 临夏县| 宁远县| 特克斯县| 博兴县| 四平市| 达尔| 新田县| 哈尔滨市| 中超| 潼关县| 无棣县| 嘉黎县| 邹城市| 青海省| 德化县| 齐河县| 五峰| 衢州市| 兴仁县| 故城县| 澄迈县| 澎湖县| 稷山县| 台州市| 顺昌县| 荥阳市| 岳池县| 象州县| 桐柏县| 上杭县| 陈巴尔虎旗| 黄平县| 咸丰县| 慈溪市| 晋州市| 息烽县| 保康县| 白山市| 长白| 玉树县| 隆安县|