Specification Pattern Example

20,705

Solution 1

Also take a look at the Dimecasts 'Learning the Specification pattern' for a walkthrough of an example.

Having learned the Specification pattern through the same blogs as you listed, I'm not yet convinced. It could just be that the examples are too simplistic so it seems more work that it's worth. A good, extensive example that shows come genuine benefit would be nice.

Solution 2

Take a look at the "Specifications" paper authored by Eric Evans and Martin Fowler.

The following blog article - "The Specification Pattern" - might also be of use to you.

Solution 3

I actually think the Wikipedia page (at the time of this post) is a more concise and easier to absorb example of using the Specification pattern...lostechies.com actually references it.

Here is the link: Wikipedia: The Specification Pattern

Solution 4

For me one of the best examples is the Route Specification that Eric Evans uses on his book.

The source code is here, it is written in Java but is very easy to understand and translate to C#.

Share:
20,705
Kane
Author by

Kane

A creative, pragmatic, and highly motivated technology professional with 20 years of experience who breathes distributed systems and sharing knowledge. Excellent interpersonal, communication, and leadership skills, with a deep passion for innovation and the cloud.

Updated on July 13, 2022

Comments

  • Kane
    Kane almost 2 years

    After reading a series of blogs (here and here) by Chris Missal from LosTechies.com on the Specification Pattern I am am really interested in finding more complete examples. Does anyone know where I could find a more fleshed out example or perhaps an open source project that uses this pattern?