Datasheet

9
Chapter 1: A Framework for Enterprise Applications
Now repeat the same steps for the data access layer and name the project V2.PaidTimeOffDAL.
Next, add the control library by right-clicking on the solution file again and select Add New Project. In
the left-hand side of the dialog, click the Web folder under the Visual C# node. Select ASP.NET Server
Control as the project type and enter V2.FrameworkControls for the name. The location should still be
the solution folder. Click the OK button.
Now, add a reference to
V2.PaidTimeOffBLL to the website. To do this, right-click on the PaidTime
OffUI
project and select Add Reference from the menu. Click on the Projects tab and choose the V2
.PaidTimeOffBLL
project. Then add a reference to the V2.PaidTimeOffDAL to the V2.PaidTime
OffBLL
project using the same instructions. Finally, add a reference to V2.FrameworkControls to
the
PaidTimeOffUI project.
Congratulations! You have successfully created a three-layered solution in Visual Studio 2008.
Summary
This chapter focused on presenting the business problem that will be solved by the application devel-
oped throughout this book. Each chapter dissects a part of the problem and discusses the design and the
code in great detail, ultimately solving the problem. The goal is to give you a framework that you can use
and enhance in your own applications to meet the requirements for your next application. Imagine how
nice it would be to be able to start your next project with a complete set of controls, classes, stored proce-
dures, and a data model for role-based security, reporting, dynamic queries, auditing, dynamic menus,
and workflow — especially workflow! How many applications out there have approval processes? The
workflow pattern defined in this book could be used by many applications for a variety of departments
in your company. HR could have a hiring workflow, application development could have an issue-tracking
workflow, finance could have a capital expenditure workflow, and the list goes on and on. I am excited to
share my experience with you and I look forward to the feedback readers provide about how they have
used this framework and improved upon it.
The adventure begins in the next chapter with an exploration of a new feature in Visual Studio 2008
called LINQ to SQL. You’ll learn all about how you can incorporate LINQ in your data access layer to
avoid a tremendous amount of repetitive code for making calls to the database. In addition, you’ll never
have to write another custom entity class again to pass data back to the business logic layer. It’s all built
into LINQ to SQL. Happy coding, my friend!
96865c01.indd 9 12/17/08 2:06:04 PM