Geeks With Blogs
The Ron on .NET Software Architecture Ron Garlit's thoughts and informational blogs on Microsoft .NET

Overview of the “AdventureWorksDesignPatterns” Project

(I’ll be posting on this series here. It will be based on the presentations I’m creating for the PhillyNJ.NET user group a subgroup of PhillyDotNet)

This is the start of a long series on “applied design patterns”. The intent to demonstrate design patterns in real code. I am not endorsing or “pushing” any specific methodologies. But I will be stressing various points of views many of which are part of various methodologies you may have heard of.

That said I have specific goals for this series which are.

1.    To write the code implementing the design patterns.

2.    To have the code implementing the pattern be in an actual component as it would be used in a Enterprise level application.

3.    To demonstrate good coding practices

4.    To explain the design patterns in the code

5.    To update tools from my previous versions of my “reusable components” or “toolbox”.

6.    To do this on the AdventureWorks Sample Database.

The Approach

We are going to build a multi layered enterprise grade application demonstrating design patterns in actual use. This is NOT to say what you will be learning is just for “Enterprise” use.

This approach can be use at all levels of applications design …. NOT just the Enterprise. I want to drive that point home.

These are design patterns for ANY professional in the software industry should know and understand. (See my Design Patterns 100 blog series)

In a sense we will sort of be taking the bottom up approach. This is because we have and existing database and reusable components that have been evolving through the years.

Many years as a matter of fact.

The fact is my reusable components are always evolving with some having their basis in my old days of a C programmer working on medical equipment. Through the Visual Basic years, and on into the .NET framework and C#.

One big example is the “DBAccess” library. This name for my personal data access component goes all the way back to the wrapper I put around the B-Tree library called C-Index by Trios Systems in eighties.

So it is safe to say I’m stuck on some naming conventions. But I assure you this version we are working on is “State of My Art”.

The AdventureWorks Database goes back to SQL Server 2005. It was the sample database to replace the PUBS and NORTHWIND we old timers have know to over and hate though the years.

It was built to be robust and to demonstrate the use f the Business Intelligence services in SQL Server. Aside from the Project REAL database there is no other sample database that is as robust and could be used to support any type of Demonstrator” ”Proof of Concept” application. You can find the AdventureWorks database in it’s latest evolution on CodePlex at .

For that fact, if you are interested in SL Server and haven’t seen the community samples you should check out the goodies at this link .

The High Level Solution

To start we have created a project solution in Visual Studio called AdventureWorksDesignPatterns that looks like this.

High Level Solution Image

This will give you and idea of what we are going to do here. Under each of these folders I will build complete projects for the logical layers of an Enterprise application.

These layers can be deployed physically in a number of ways via configuration changes and no rewriting of code.

The plan is to build the following projects in these folders:

01-Presentation Layer

·      MVC 2 Framework projects (Framework 4.0) .

·      Webforms Projects (Framework 4.0) .

·      Windows Presentation Framework (WPF) Projects (Framework 4.0) .

·      Silverlight Project (If I get to it.)

02-ServiceHost Layer

·      IIS Hosting WCF Projects for the Service Layer

·      Windows Service WCF Projects for the Service Layer

·      WCF NamedPipes Project for Service Layer (Compressed WebApp Tier Design)

03-Service Layer

·      Base Service Projects (datacontracts, message design, mapping, service implementations, etc..)

04-Business Layer

·      Business Objects Projects

05-Data Layer

·      Data Access Objects (DAO) and Factory Projects built using my DBAccessLibrary based on ADO.NET


·      DBAccessLibrary Projects

·      EncryptionLibrary Projects

·      FileSystemToolsLibrary Projects

·      LoggingToolsLibrary Projects

Database Solutions

·      AdventureWorks2008R2 Project (Scripts of Community Sample)

·      AdventureWoerksDesignPatternsDB Project (Modified AdventureWorks2008R2)

The work will initially begin from the bottom up.

Since we already have the reusable components and the database work will start here. Explain the design, what patterns are used, unit tests, etc..

I will be building a working ServiceHosting layer, Service layer, Business Layer, Data Layer ComponetsFW and Database first.

The idea is to get a working “Business Service” in place explaining all the design patterns to that level and the work that goes into it.

Once that is completed to a certain level, then we start on the presentation layer projects.

It is here that we will build various working “front ends” for our services.

The key points from the design is to have the proper separation of concerns through out the various layers of the design and to minimize maintenance.

In the end the reader will have functional code base, tools and understanding of design patterns.

I hope you decide to join me on this Adventure.

The Ron


Posted on Wednesday, June 1, 2011 10:42 AM | Back to top

Comments on this post: Applied Design Patterns Series

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © RonGarlit | Powered by: