Datasheet

4
Chapter 1: A Framework for Enterprise Applications
Chapters 2 through 5 review the overall architecture of the framework, and these are the most crucial
chapters to read before proceeding. Each chapter is detailed and uses new features in Visual Studio
2008. Chapter 6 and subsequent chapters demonstrate how Mary’s requirements are implemented in
the application and give you plenty of code you can use in your own applications. The final solution is
available for download on the Wrox website,
www.wrox.com.
Chapter 2: The Data Access Layer
Conceptually, the data access layer is the simplest layer of the traditional three-tiered architecture.
Simply put, the data access layer calls stored procedures that reside in the database or executes dynamic
SQL against the database. In prior versions of the .NET Framework, as the developer you were respon-
sible for making sure that you knew which type of ADO.NET object should execute a stored procedure
and what type of object should be passed back to the business layer. The debate about which object to
pass back to the business layer is always heated, but the .NET Framework has given us a tool that could
calm those debates.
This chapter introduces the new LINQ to SQL features and utilizes the built-in ORM Designer tool to
create a set of entity classes that communicate with the database and are passed back to the business
layer. Don’t worry, stored procedures still work with LINQ to SQL, and I’ll show you how.
Chapter 3: The Business Logic Layer
The business logic layer, aka the middle tier, is where you apply the business rules against any data
that should be saved to or deleted from the database. Simply creating a class that mimics the fields in
a table is not enough. The business logic layer must protect the integrity of the data in the application
by implementing business rules such as required fields, unique fields, limits, and calculations. If rules
are broken, then the business logic layer must communicate them back to the caller and not bother the
data access layer. This chapter describes the pattern for a set of base classes that encapsulate the busi-
ness rules for all business objects in the middle tier. It also reviews options for creating lists of business
objects and the base classes that are the building blocks for all lists in the application.
Chapter 4: The User Interface Layer
The user interface is the only part of an application that the user sees, so it is important to keep it con-
sistent and easy to navigate. Style sheets and ASP.NET themes can be used to control the fonts and col-
ors of your application, but the developer has complete responsibility for the overall navigation of the
system. If you have a Save button on the bottom-left corner in one screen and on the upper-right corner
in another, the style sheet won’t help you. This chapter reviews style sheets, master pages, nested mas-
ter pages, and the UI framework that will be used throughout the application. This chapter also builds
two custom server-side controls for a dynamic menu that will eventually be integrated with the role-
based security built in Chapter 6.
Chapter 5: Exception Handling
This is one area that is often overlooked when building an application, but it’s one of the most impor-
tant. I often see new developers completely forget to add exception handling to an application; or when
they do handle exceptions, they aren’t handled correctly or dont notify anyone when they occur. It is
96865c01.indd 4 12/17/08 2:06:02 PM