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

Chapter 3. ER Diagrams, Domain Model, and N-Layer Architecture

In the last chapter, we saw the basic layering of the monolithic 1-tier 1-layer architectural style in action, with the UI layer having code-behind classes as the sub-layer. This 1-tier 1-layer architecture is the default style in ASP.NET and Visual Studio 2005/2008. To overcome the limitations of this style, we can further break the application code into n-layers, where the number "n" actually depends on the project requirements.

In this chapter we will:

  • Learn the 2-layer style
  • Understand ER diagrams
  • Understand what a domain model is, and what UML relationships are
  • Learn the 3-layer style
  • Learn about object data source controls

Let's revisit the 1-tier ASP.NET application configuration described in the last chapter.

Note

Note that the application as a whole including database and client browser is three tier.

ER Diagrams, Domain Model, and N-Layer Architecture

As mentioned in the last chapter, we can call this 1-tier architecture a 3-tier architecture if we include the browser and database (if used). For the rest of this chapter we will ignore the database and browser as separate tiers so that we can focus on how to divide the main ASP.NET application layers logically, using the n-layer pattern to its best use.

We will first try to separate the data access and logical code into their own separate layers and see how we can introduce flexibility and re-usability into our solution. We will understand this with a sample project. Before we go ahead into the technical details and code, we will first learn about two important terms: ER Diagram and Domain Model, and how they help us in getting a good understanding of the application we need to develop.

主站蜘蛛池模板: 大同县| 长沙市| 金乡县| 阿合奇县| 镶黄旗| 安新县| 元氏县| 彰化市| 增城市| 铜陵市| 克什克腾旗| 岳池县| 万州区| 北流市| 滨海县| 思茅市| 进贤县| 凤庆县| 鄂伦春自治旗| 尼勒克县| 福安市| 富源县| 靖江市| 垣曲县| 五家渠市| 韶关市| 八宿县| 香港| 元氏县| 赣州市| 达州市| 屏山县| 阿坝县| 濮阳市| 四川省| 广河县| 三河市| 凤城市| 壤塘县| 孟州市| 额尔古纳市|