Datasheet

So you’ve seen what the Online Diary does, now you can look at how it does it! The next section
describes the overall design and how the system hangs together. You get a high-level tour of the
database setup and each of the classes the system uses.
Design of the Online Diary
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
04_749516 ch01.qxp 2/10/06 9:11 PM Page 6