Specification Pattern Example [closed]

陌路散爱 提交于 2019-12-18 10:13:30

问题


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?


回答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.




回答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.




回答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




回答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#.




回答5:


You can find many sample projects about design patterns (Specification Pattern as well) here from "Professional ASP.NET Design Patterns" book.



来源:https://stackoverflow.com/questions/1436663/specification-pattern-example

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!