ASP.NET 2.0 Instant Results



The diary system is split into the common three-layer architecture. All data and direct data modifying
code are in the data layer, a combination of database tables and stored procedures. The data access layer
is examined next.

Above the data access layer is the business layer providing all the rules and intelligence of the system.
The business layer has been coded as seven classes, which you tour through shortly.

Finally, the bit the user sees is the presentation layer, consisting of a number of .aspx files that utilize the
business and data access layers to create the diary's interface. This layer is discussed in the last part of
this section.

The Data Access Layer
The Online Diary uses a SQL Server 2005 Express database. However, there's no reason why this couldn't
be changed to work with other databases. If the database supports stored procedures, then in theory all
that's needed is a change of connection string and creation of stored procedures matching those in the
current SQL Server database. If the database doesn't support stored procedures -- for example, MS
Access -- changes to class code would be necessary but not difficult.

Figure 1-10 shows the tables in the Online Diary database (DiaryDB).
Figure 1-10
6
Chapter 1