.NET Design Pattern Framework 4.5

An easy-to-follow guide for .NET Architects
building applications with Design Patterns

Building world-class applications with:
  Gang of Four Patterns
  Enterprise Patterns
  3-Tier/N-Tier Patterns
  Head First Patterns
  Repository Patterns
  Unit of Work Patterns

  REST Practices
  WPF Practices
  Conventions over XML
  Entity Framework
  Dependency Injection
  OAuth Practices

  ASP.NET MVC Patterns
  MVP Patterns
  MVVM Patterns
  Active Record, CQRS
  Testing and Mocking
  Architectural Guidance

In two editions:  C# and VB
100% source code

To immediately find out about easy ordering and pricing click here.
Or, continue reading and explore the details of this unique package.

What others are saying

Here's an unsolicited letter from Miguel A. Castro. He is a Microsoft MVP for C#/ASP.NET, a well-known .NET author, .NET trainer, and the author of two popular Pluralsight courses on building extensible and service-oriented .NET architectures.

Quite a package you guys put together there - code and docs. You've managed to compile for me what I've been grabbing from various sources over a long time.

I'm very impressed. Keep up the good work!

Miguel A. Castro  
Microsoft MVP and .NET Architect

What do I get with the .NET Pattern Framework?

The .NET Design Pattern Framework 4.5 is actually 10 products in one -- each filled with .NET code and information you will not find anywhere else -- and each working together, ready to give your apps, your projects, and your career a boost. They are:

  1. 69 Comprehensive .NET 4.5 GoF Design Pattern Projects
  2. 23 Valuable UML Diagrams in Visio format
  3. 3-Tier / N-Tier Pattern and Practices based Architectures
  4. Reference Application:  ASP.NET MVC Patterns
  5. Reference Application:  ASP.NET Web Forms Patterns
  6. Reference Application:  Windows Forms Patterns
  7. Reference Application:  WPF Patterns
  8. NEW  Art Shop -- A fully functional, real-world e-commerce Web App
  9. NEW  SparkTM -- A rapid application development (RAD) platform & more...
  10. Printable PDF documents for all Projects & Patterns

Our most recent release, Design Pattern Framework 4.5, has been enhanced with the latest insights into building apps using modern architectures, patterns, and best practices. These include MVC 4, SimpleMembership, OAuth with Facebook, REST, Active Record Pattern, CQRS Pattern, Repository and Unit-of-Work Patterns, and more.

We're particularly excited about the addition of our new SparkTM technology. Spark is a RAD (rapid application development) platform that helps you deliver .NET applications faster and better than ever before. Continue reading to learn more.

Let's review each of the 10 products in more detail.

1.   69 Comprehensive Gang-of-Four .NET 4.5 Pattern Projects

Have you ever wondered how useful it would be to have dozens of design pattern source code projects available at your fingertips?

Search engines are just a few clicks away, but the results require you to wade through many pages before you may find your answer -- mostly without meaningful or useful sample code.

Not so with the 69 ready-to-run Design Pattern projects. You will have the following code available at your fingertips.

  • 23 Structural Gang of Four design patterns
  • 23 Real-World Gang of Four design patterns
  • 23 .NET 4.5-Optimized Gang of Four design patterns
A total of 69 design pattern projects -- each clearly named and within easy reach. How easy? Simply create a shortcut to our master .NET Solution on your desktop and you're ready to explore and reference all 69 software solutions. Of course, everything codes with 100% pure source code.

Easy access using desktop shortcut(s) for C# and VB:

Design Pattern shortcuts

Double click a shortcut and all 69 pattern projects are instantly available:

Design Pattern Solution Explorer

100% pure source code for the best learning experience:

Visual Studio .NET code editor

2.   23 Valuable UML Diagrams in Visio format

Many of you have asked about the Visio templates for the UML diagrams of the 23 Gang of Four Patterns. We are now including these in the .NET Design Pattern Framework!  23 Visio templates in all: one for each of the Gang of Four patterns.

Use these for your study of design patterns or when discussing patterns with your team. Or perhaps you want UML printouts of commonly used patterns on your office wall. Whatever your need, you have all UML diagrams available in a format you can work with.

23 Design Pattern UML Diagrams in Visio

Visio pattern diagrams

3.   3-Tier / N-Tier Pattern Architecture

The .NET Design Pattern Framework 4.5 comes with a unique reference app named Patterns in Action. It is built on a 4-tier pattern architecture using numerous design patterns and best practices.

Patterns in Action demonstrates, in great detail and with 100% source code, how to build a flexible multi-tier pattern-based architecture that supports any UI technology: ASP.NET MVC, WPF, and Windows Forms.

Each UI communicates with the application via the exact same service tier (the Facade Pattern). You are getting 4 completely functional apps built on ASP.NET MVC, ASP.NET Web Forms, Windows Forms, and WPF.

See images of each UI platform below:


ASP.NET Web Forms

Windows Forms


Did you notice the difference among these UIs?  And yet, they are:

  1. Built on the exact same multi-tier pattern architecture,
  2. Consume the exact same Service layer, and
  3. Talk to the exact same database.

Quite remarkable!

So how does one build something like this? Below is an image of the Patterns in Action solution which shows the organization of the projects and the layers within the solution.

The red arrows show the 4 layers: presentation, service, business, and data (they are numbered 1 through 4).

The presentation layer itself supports 4 different UI platforms, one project for each. What is most interesting is that each UI accesses the same service, the same business, and the same data layers below.

The next diagram depicts the entire architectural stack:

The Presentation layer supports 4 different UI technologies, two of which are web applications that use the browser. To get to the database, each of the UIs needs to go through the other 3 layers starting with the Service layer and then down via the Business and Data layers all the way to the database.

The Data layer offers 3 different providers to get to the database: ADO.NET, Linq to SQL, and Entity Framework. A web.config value determines which one is used. Swapping out data providers is made easy by using the DAO (Data Access Object) pattern.

Let's look at the patterns and practices used to build this solution. Here's an overview:

The yellow Convention over configuration box represents a best practice paradigm that is fundamental to the entire solution. Applying convention over configuration greatly simplifies the entire application stack making it easier and faster to build.

Next, we see numerous green boxes, each representing a design pattern, scattered throughout the solution. They come from 3 major pattern categories: Gang Of Four patterns, Fowler's Enterprise patterns, and the Model-View family of patterns. All are reviewed and discussed in depth in this package.

More about the 'Patterns in Action' reference application

Patterns in Action is a comprehensive 4.5 .NET reference application that demonstrates when, where, and how design patterns are applied in modern application design.

Of course, you re getting 100% source code -- nothing is hidden.

The application includes features that are characteristic of e-commerce applications. For example, users can browse a product catalog, view products and product details, add items to a shopping cart. Also included is an administrative module in which administrators manage customer data and reports on customer orders with all order details.

However, Patterns in Action is valuable beyond e-commerce applications. Valuable code examples include: a hierarchical menu system, an error logging facility, business rules engine, and a system of a highly configurable data access objects (DAOs).

.NET architects who purchased the Design Pattern Framework tell us they use this application each and every day as an architectural reference to their own projects.

Below is an overview of each UI platform in Patterns in Action.

4 & 5.   Sample Application: ASP.NET MVC and Web Forms Patterns

Here are some additional images of the ASP.NET application (both MVC and Web Forms) built on a 4-tier Pattern Architecture.

Product Catalog and Product List

Product Details / Add to Cart

The two projects built with MVC and Web Forms appear and behave the same, but their underlying code is very different. MVC is based on the MVC (Model View Controller) design pattern, whereas Web Forms is built with traditional code behind pages.

6.   Sample Application: Windows Forms Patterns

The Windows Forms also consumes the same architecture. It is built with the MVP (Model View Presenter) design pattern. You get to see it all; remember this package comes with 100% source code.

Login to SimpleMembership Service

Customer List with Orders and Order Details

7.   Sample Application: WPF Patterns

Next is the WPF application which, again, is built on the same n-tier pattern architecture. This application is built with the popular MVVM (Model View ViewModel) design pattern.

Login to the Application

List of Customers with Images

8.  Art Shop -- A fully functional online store

.NET Design Pattern Framework 4.5 doesn't stop with Patterns in Action. New in this release is a web application called Art Shop which is a stylish, production-quality art store that sells art reproductions by famous classic artists like Van Gogh, Cézanne, and Monet.

The Art Shop is built with Spark 4.5, our new RAD (rapid application development) platform.
Details on Spark are further below.

First, here is the home page of the Art Shop.

Art Shop Home page

The Art Shop web application includes a store front, shopping cart, checkout page, and order confirmation page. A comprehensive administrative area allows the administrator to view and manage customers and orders. A reporting section is where both pre-packaged and ad-hoc reports are generated. An attractive dashboard page with charts summarizes business performance and statistcs.

Also worth mentioning is that security in the Art Shop is very comprehensive. It includes authorization, authentication, OAuth (with complete Facebook login support), cross-site scripting, and SQL injection.

The store front is particularly interesting. You will learn how to implement common UI patterns including search, sort, filter, and paginate on a single page. Full page refreshes are not required which makes the website super responsive. Partial page refreshes and the use of JavaScript and Ajax are all aspects of building SPA (Single Page Application) solutions. All this and more is covered by this package.

The user experience and usability of an app is greatly affected by how master-detail pages are implemented. In Art Shop these pages actively maintain their browser cache (using JavaScript). This results in very natural page transitions creating a wonderful user experience.

Here are some additional images of the store where users purchase art work -- by the way: Art Shop comes with a fully functional shopping cart.

Art Shop Store Front
(Notice the search, filter, sort, and pagination controls)

Art Shop Product Details Page

Art Shop Shopping Cart

User registration is handled by SimpleMembership with full OAuth support for Facebook.

Art Shop Sign Up with Facebook support

A secure administration area in the application allows admins to maintain users and orders, view and generate reports (pre-configured or ad-hoc), and explore store statistics via a dashboard page with charting.

Art Shop User and Order Administration

Art Shop Dashboard with Charts

Art Shop Powerful Adhoc Reporting

A REST interface (built with Web API) allows external clients to access the Art Shop via a well-designed web service.

As you can see, the application is comprehensive, and yet, the solution is remarkably agile and simple. It has only 4 projects of which 2 are optional (the REST and REST test projects). Here is an overview of the Art Shop solution in Visual Studio.

Art Shop Solution

The first project, Art.Web, contains the Presentation layer. The second project, Art.Domain, holds the remainder of the application including the Service, Business, and Data Access layers. A simple and perfect structure to work with.

Next we'll explore the Spark platform, which was used to construct the Art Shop.

9.   SparkTM 4.5  Platform

We are super excited about the addition of Spark to our latest release of the Design Pattern Framework. Spark was developed by DoFactory and it is a light-weight, rapid application development (RAD) platform that provides unparalleled productivity through some of the best patterns and practices. With Spark you will deliver quality apps on time and under budget.

Here are the basic building-blocks of this platform:

 Layers Presentation, Service, Business, and Data Access
 Patterns Repository, Unit of Work, Facade, Active Record, MVC, DTO, and CQRS
 Practices Convention over Configuration and YAGNI
 Libraries Automapper, Json.NET, Bootstrap, JavaScript + jQuery, and History.js

Applications built with Spark have 4 layers:
- The Presentation layer provides the UI (user interface) and the user experience
- The Service layer offers a simple query and service interface for the UI code
- The Business layer offers the business objects with business rules, and
- The Data Access layer provides fast data access to and from the database
Rest assured, the layering model is explained in great detail in the documentation.

Spark uses a limited set of patterns from 3 major patterns categories: Gang of Four, Enterprise, and Model-View. A very important pattern in Spark is Active Record. This pattern essentially merges the data model and the object model into one. Having to remember only a single model greatly simplifies and accelerates development.

The table above lists the key patterns in Spark. In case you're not familiar: DTO = Data Transfer Object and CQRS = Command Query Request System. Again, all design patterns and their use are explained in the documentation.

Best Practices
A core paradigm in Spark is convention over configuration. The Spark platform follows some simple conventions which greatly increases developer's productivity. All best practices used in Spark share a common desire for simplicity and productivity.

The table above lists the key practices in Spark. In case you're not familiar: YAGNI = You aint gonna need it, meaning only develop what is absolutely necessary; nothing more and nothing less.

Spark uses a limited set of open-source tools and libraries which includes both .NET and JavaScript libraries. Together they accelerate development and enhance the user experience.

Building apps with SparkTM is quick and easy!

Spark is pervasive. This is clear from the diagram below which depicts the scope of Spark throughout the application stack (Spark is represented by the light-blue parts):

With so much code and infrastructure in place, no wonder productivity is high.

The white areas in the diagram are the extension points where you add your application-specific code. MVC is mostly white, so this is where most of the development will take place. Guess what, this is the perfect place!  Your applications are unique and the presentation tier is where you express this uniqueness by building unique UIs and user experiences -- as opposed to the more humdrum service, business, and data layers.

Spark is an exciting, light-weight, pattern-based technology that will greatly accelerate and enhance your .NET projects. Try it for yourself. Once you experience the benefits you won't go back!

Benefits of SparkTM 4.5

Accelerate your projects, your apps, and your career

Spark captures many years of pattern based .NET development experience and makes it available as a powerful RAD platform. It allows developers to create applications quickly and easily. Get your own copy of the Design Pattern Framework 4.5 today and accelerate your projects, your applications, and your career.

Works for all .NET UI platforms. And beyond

Spark is not limited to MVC. The bottom three layers in Spark support all .NET platforms: ASP.NET MVC, ASP.NET Web Forms, WPF, and Windows Forms.

In fact, it goes beyond .NET. By exposing a REST interface non-Microsoft platforms can interact with your apps as well. This includes mobile devices such as IPhone, IPad, and Android and many others (the green boxes below).

By the way, Spark offers great support for building REST interfaces. The sky is the limit.

You're always in control

Applying Spark to your applications requires that you follow some simple conventions and patterns. However, these are flexible enough to let you refine or tweak the code in each of the layers with specially designed extension points (implemented as partial classes, partial methods, and virtual methods). Spark is flexible and leaves you always in control.

You can focus on what is really important

Spark takes care of the more mundane tasks, which allows you to focus on what is really important: creating wonderful apps with a unique front-end and user experience. The UI is where you really want to spend most of your development time because this is what sets your apps apart from others.

Deliver applications on time and under budget

The Spark platform takes responsibility for large parts of your applications. This will give you a huge head start allowing you to easily meet (or beat) all deadlines and deliver your apps on time and under budget. No more deadlines -- imagine that!

Struggling with impedance mismatch? Consider it solved!

The Active Record pattern plays an crucial role in Spark. This pattern essentially merges the object model and the data model into one. As a developer this is great because you only need to keep track of a single model rather than two very different models. What's more, you don't have to worry about the dreaded impedance mismatch anymore.

Spark is a MicroORM. And more

Interest in MicroORMs (Object Relational Mappers) has grown significantly over the last couple years. Well known MicroORMs include Dapper, Massive, and PetaPoco. Spark is a MicroORM also, but without the limitations of the others.

For example, Spark data queries return type-safe business objects rather than dynamic .NET objects (which is what Massive does). Dynamic objects are more difficult to work with because they don't support Intellisense and may cause unexpected runtime errors. Furthermore, Spark does not require that you write full length SQL statements as in Dapper and PetaPoco. In Spark you provide small 'where' and 'orderby' snippets giving you the full flexibility of SQL but without the overhead of writing lengthy SQL statements.

Indeed, Spark is a MicroORM, but that is only part of the story. Spark also provides guidance, patterns, conventions, and code for the entire applications stack.

No JOINs! Simple and super fast data access

Applications in Spark rarely require SQL JOINs. If this sounds unbelievable, the Art Shop reference application does not use a single JOIN in the store! This is made possible by a combination of 1) data model conventions, 2) data caching, and 3) automatic updates of aggregate column values. Data access in Spark is simple and extremely fast! There are few apps that can make that claim.

Just to be clear, the Art Shop admin area does use JOINs. This is where non-transactional analytics and reporting queries are issued, so this is to be expected.

 PRO  Design Pattern Framework 4.5

PRO Design Pattern Framework 4.5 With this release we also offer a new edition of the Design Pattern Framework called PRO Design Pattern Framework 4.5. It comes with a T4 code-generator that automatically generates three out of four application layers: Service, Business, and Data Access -- as well as a large part of the REST interface.

With most of the mundane and repetitive code out of the way, you can immediately focus on the UI and user experience. The PRO framework allows you to develop .NET applications up to 4 times faster!

Before purchasing the PRO package, we strongly recommend that you first explore and evaluate the standard Design Patterns Framework 4.5 with Spark. There is no risk because if you decide to upgrade we've already discounted the standard price from the PRO purchase price. To learn more about the PRO version click here.

10.   Printable PDF documents with all Patterns

Many developers like to have a design pattern manual or reference guide in printable form. With the Design Pattern Framework you're getting numerous printable PDF pattern documents.

You're getting over 300 documentation pages with important details on each of the the patterns, architectures, components, and applications. These documents go hand in hand with the aforementioned pattern projects and reference applications. Code + Manuals: a very powerful combination indeed.

All this valuable information, in combination with useful source code, you won't find anywhere else.

The Design Pattern Framework is very popular

Since our first release, thousands of .NET architects and .NET developers have come to rely on the Design Pattern Framework for their projects.

As a .NET developer you know the value of having access to source code written by expert developers. You study the code, internalize the best ideas, and then apply these to your own work. Exploring master-crafted source code is the most effective way to become confident and proficient at applying patterns to your own work.

How do we know?

  • We are developers, architects and MCSDs ourselves -- and we know how we got there,

  • We train developers on design patterns. So, we know the most effective way to study patterns, and

  • Our website has offered design pattern source code for many years. Every day, we get thousands of .NET developers who come here to get the necessary information that make them succeed in their work and their career. Developers need source code!

But don't take our word for it.

Here's proof that we are the #1 .NET Design Pattern source on the Internet!

Search Google for '.NET Design Patterns'  --  see that we are #1!

Search Bing for '.NET Design Patterns'  --  see that we are #1!

Search Yahoo for '.NET Design Patterns'  --  see that we are #1!

Bonus 1:  Getting Started Guide

The Design Pattern Framework 4.5 comes with a lot of information. To help you get started quickly and navigate throught the different parts of the Framework we now include, as a bonus, an easy-to-read Getting Started guide.

This guide will get you up and running quickly and before you know it you'll be living the .NET Pattern Lifestyle.

Here are the sections included in this guide:

  1. Setup and Installation
  2. Database Configuration
  3. Projects and E-books in the Framework
  4. Learning about Design Patterns
  5. What are Design Patterns
  6. Exploring Design Patterns
  7. Applying Design Patterns

Bonus 2: Head First Design Patterns

If you have been following what is going on with design patterns then you know that the Head First Design Patterns book is one of the more popular pattern books. It is one of those rare gems that has the ability to make something as complex as design patterns, easy and fun to learn.

Unfortunately, this book is targeted at Java developers and comes with code samples in Java. Indeed, Java is similar to C#  but the samples use Java types and Java packages which makes the code all but irrelevant for .NET. Examples are: Swing, Applets, Observer/Observable types, Java I/O classes, and Java RMI (remote method invocation). It's hard to study these patterns and be concerned about subtle -- and not so subtle -- language and platform differences.

As an extra bonus, the Design Pattern Framework includes a complete set of Head First Design Patterns in (C# and/or VB). You'll get a total of 46 Head First Design Pattern projects nicely packaged in an easy to use .NET solution. Simply create a shortcut on your desktop, double click, and all source code projects are available at your fingertips.

Head First Design Patterns for .NET

The Head First book itself does not reference the Java code samples which makes it hard to link the samples back to the appropriate pages in the book.

This is why we are including a reference document that relates each .NET project back to the appropriate page number where the topic of the pattern begins. In addition, this document also highlights the differences between Java (i.e. the book) and the .NET implementations of these patterns. So, snuggle up in your favorite chair with this book and the .NET code samples and make learning design patterns a fun experience.

Head First Reference Document

The benefits are clear

As you can see, the .NET Design Pattern Framework is a unique product. It has all the information you need to make informed decisions about when, where, and how to apply proven design patterns. This is the kind of product that will change your outlook on development as you start incorporating patterns and practices into your own projects.

The benefits of design patterns and practices are clear: your apps will be simpler, easy-to-maintain, and fast. The .NET Design Pattern Framework 4.5 is an investment in your success.

There really is no comparable product. To get your own copy, place your order and get started right away. What do you have to lose for just $79?

Another unsolicited letter from a delighted .NET developer.

Your Framework is excellent. I have been trying to learn patterns for a couple of years with very little success but this has worked wonders in a couple of days and I am up to speed!

Javaid Karim
Freelance .NET Developer
DataByte Computing
London, UK

Ready to order? Choose your favorite: the C# edition or VB edition. Or both!

You're just a couple of clicks away from having your own .NET Design Pattern Framework. Order now and within minutes you'll be exploring this unique package.

60 Day risk-free money-back Guarantee

Your satisfaction is 100% guaranteed!  If, after you have explored the materials, you feel that the Design Pattern Framework 4.5 is not going to improve your .NET applications, then please contact us within 60 days of the date of your purchase and receive a full refund.

Here's how to order your Design Pattern Framework

Ordering is easy. Select the edition you want and click the 'Order Now' button. Pay with a credit card, debit card, or Paypal (there is no need to setup a Paypal account).

Following payment you will receive a confirmation email with your credentials. Login and instantly download your own copy of the Design Pattern Framework 4.5.

Your purchase includes a 1-year subscription which allows you to download any new or updated releases during that period for free!

.NET Design Pattern Framework 4.5   --   1-user license
     C# Edition - single user license $79 order now
     VB Edition - single user license $79 order now
     C# + VB Edition - single user license $99 order now

Developing with a team?

If you are working with a development team it may be more cost effective to order a 16-user license. It allows up to 16 users on to use the Design Pattern Framework.

Compare these prices to formal classroom training. The .NET Design Pattern Framework is highly cost effective to get your team started with design patterns. Order details are below.

.NET Design Pattern Framework 4.5   --   16-user license
     C# Edition - 16 user license $249 order now
     VB Edition - 16 user license $249 order now
     C# + VB Edition - 16 user license $299 order now

Alternatively, order a site-wide license which allows unlimited users at a single physical address to benefit from the .NET Design Pattern Framework.

.NET Design Pattern Framework 4.5   --   site license
     C# Edition - site license $549 order now
     VB Edition - site license $549 order now
     C# + VB Edition - site license $599 order now

P.S.: The .NET Design Pattern Framework is the kind of product that you will not find anywhere else. Remember, it comes with 100% source code.

P.P.S.: You can order with confidence because it is backed by a 100% guarantee. Our full 60-day money-back guarantee will give you plenty of time to explore and evaluate the .NET Design Pattern Framework 4.5.

P.P.P.S.: If you miss this, you will kick yourself...

Design Pattern Framework 4.5 requires VS 2012/.NET 4.5 Professional or better. All prior versions are included with your purchase: for VS 2010/.NET 4.0, VS 2008/.NET 3.5, VS 2005/.NET 2.0, and VS 2003/.NET 1.1.

By purchasing and downloading the products you agree to the terms and licensing.