Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specification Pattern Example [closed]

Tags:

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?

like image 635
Kane Avatar asked Sep 17 '09 04:09

Kane


People also ask

What is the specification design pattern?

In computer programming, the specification pattern is a particular software design pattern, whereby business rules can be recombined by chaining the business rules together using boolean logic. The pattern is frequently used in the context of domain-driven design.

Why use Specification pattern?

Specification design pattern allows us to check whether our objects meet certain requirements. Through this design pattern, we can reuse expression specifications and combine those specifications to easily question whether more complex requirements are satisfied or not.

What is Specification pattern c#?

Specification pattern is a pattern that allows us to encapsulate some piece of domain knowledge into a single unit - specification - and reuse it in different parts of the code base. Use cases for this pattern are best expressed with an example.


2 Answers

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.

like image 104
Dr Herbie Avatar answered Oct 16 '22 03:10

Dr Herbie


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.

like image 25
Brandon E Taylor Avatar answered Oct 16 '22 04:10

Brandon E Taylor