設計並實現用於ASP.NET一個通用的資料存取層應用程式

來源:互聯網
上載者:User
asp.net|程式|設計|資料 Designing and implementing a versatile data access tier for an ASP.NET application
By Paul Abarham

In this article, we will drill down deeper in to the design of a n-tier architecture and our focus will be on the data access tier (DAT)

Abstract



設計並實現用於ASP.NET一個通用的資料存取層應用程式

作者 Paul Abarham 翻譯 cwxiao888@163.com



在此文中,我們將深入研究n-tier架構的設計,而且我們將聚焦於DAT (DAT,data access tier) 。

摘要



In this article, we will drill down deeper in to the design of a n-tier architecture and our focus will be on the data access tier (DAT) (Figure 0).Our goal is to design and implement an appropriate data access tier(DAT) for scalable, reliable and interoperable web application. I have divided this article in to two major parts. In the first part, we will discuss about architectural goals, typed DataSet, EventLogs and HttpModules, which are helpful to understand the second part of this article . We will build in the second part a small(but fine) n-tier application and our focus will be on design and implementation of data access tier. You need a SqlServer (database: Northwind) and VS.net to follow this article.

在此文中,我們將深入研究n-tier架構的設計,而且我們將聚焦於DAT (DAT,data access tier) (Figure 0) 。我們的目標是設計並實現一個可升級的可靠並且相互協同DAT網路應用程式。我已將本文分成兩個主要的部分。 在第一部分中,我們將討論有關於架構的目的,typed DataSet,EventLogs和HttpModules,這有益於理解本文的第二部分。 在第二個部分中我們將建立一個小的(但是很好) n-tier應程式,而且我們的焦點集中在在設計和實現DAT。 你需要一個SqlServer (資料庫:Northwind )和VS.net來跟隨本文進行操作。

Contents:內容

1. Designing Goals of a data access tier(DAT)DAT的設計目標

1.1 Architectural Goals 架構目標

1.2 Installation of the prototype prototype的安裝

1.3 Typed DataSets

1.4 Event Logs

1.5 HttpModules

2.0 Implementing versatile data access tier(DAT) 實現通用的DAT

2.1 Implemeting a super class for data access tier. 實現一個用於DAT的超類(super class)

2.2 A performance test to evaluate SqlDataReader and DataSet objects in the business tier.

評估商業層(business tier)中SqlDataReader 和 DataSet對象的效能測試

2.3 How can I extend this data access tier (DAT) to access multi-databases.

我如何才能擴充此DAT至存取多層資料庫(access multi-databases)

2.4 How can I apply database transactions with different isolation level?

我如何應用不同隔離等級(different isolation level)的資料庫處理(database transactions)?

2.5 How can I insert and retrieve images?

我怎樣插入和檢索圖象?



Figure 0 shows us a typical 3 Tier Application that is dissected in to three major disjunctive layers, which are data tier (DA),middle tier and presentation tier (PT).

Figure 0給我們展示了一個典型的3 Tier應用,它被分成三個主要的分離層,data tier (DA),middle tier 和 presentation tier (PT)。



If you are not familiar with n-tier architecture, I like to recommend following articles.

http://www.c-sharpcorner.com/Tutorials/Building3TierAppPA.asp

http://www.c-sharpcorner.com/Code/2002/June/AdoNetWinDNAPerspective.asp

如果你對n-tier架構不太熟悉,我給你推薦下列文章。

http://www.c-sharpcorner.com/Tutorials/Building3TierAppPA.asp

http://www.c-sharpcorner.com/Code/2002/June/AdoNetWinDNAPerspective.asp



1. Designing an appropriate data access tier (DAT)

1.0 Architectural Goals

The must requirements of an enterprise application can be expressed through the following buzzwords

Interoperability and Extendibility

Scalability and Performance

Reliability and Manageability

Security

Let us look some of the buzzwords closer, what do they really mean?

Interoperability deals with the ability of a system to communicate with other internal or external systems in a heterogeneous environment . This is a very important issue, because we need information to act just in time to meet needs of our customers and business partners. To achieve this important goal, our system must able to offer and consume web services.

To be agile in your business, sometimes you need to extend your application. If we couple a system so tightly to other systems, then it may trigger a “modify avalanche” (e.g. you pass data to a peer application via email, which represents data tables through comma separated columns. The recipient will open the email and parse it to gain information. Say, if we want add or change a column, then we have to modify other depending systems too because the order of columns have changed).In order to avoid “modify avalanches”, we must couple systems loosely using technologies such like Web services (preciously: XML supported technologies ).

Scalability is a meas



相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.