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

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.

主站蜘蛛池模板: 星子县| 宿迁市| 富裕县| 鸡西市| 旬阳县| 黔江区| 南汇区| 萨迦县| 盘锦市| 阿合奇县| 延安市| 砀山县| 都兰县| 田东县| 天津市| 汨罗市| 成安县| 巴东县| 伽师县| 肥乡县| 固阳县| 阿拉善右旗| 黔南| 梨树县| 津市市| 竹北市| 甘谷县| 南和县| 长治县| 化德县| 禹州市| 荥经县| 娄底市| 平远县| 佛教| 财经| 吉木萨尔县| 通道| 松原市| 漾濞| 商洛市|