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

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.

主站蜘蛛池模板: 新巴尔虎左旗| 中阳县| 尉犁县| 伊吾县| 宜城市| 南丹县| 木里| 陈巴尔虎旗| 义乌市| 永济市| 苗栗县| 仲巴县| 巴青县| 华容县| 通道| 方城县| 焉耆| 武胜县| 天柱县| 灌南县| 安阳市| 白朗县| 峨边| 和顺县| 平潭县| 焉耆| 措美县| 绩溪县| 南丹县| 陕西省| 卢湾区| 栖霞市| 临湘市| 托克逊县| 安福县| 乐都县| 镇宁| 鹤庆县| 洛川县| 北辰区| 永靖县|