Allows business rules to be recombined by chaining the business rules together using boolean logic. The pattern is frequently used in the context of domain-driven design.
Questions tagged [specification-pattern]
114 questions
0
votes
1 answer
most explicit specification in specification pattern for strategy
say I have a lot of business logic to determine app behavior based on multiple factors. Also, I have some really good places where I know I can replace the behavior with a strategy pattern. Also, considering I'm trying to leverage various patterns…

Chris Hayes
- 3,876
- 7
- 42
- 72
0
votes
1 answer
DDD Specification pattern - where do they belong?
I have an array of Users and I need to know if the array contains only one User and if so, is that User a super user. For this, I think a Specification (isSatisifedBy) is perfect for this, however, where in my application should I save these files?…

Matt
- 2,713
- 5
- 27
- 35
0
votes
3 answers
DB Structure for a shopping cart
I like to develop a shopping cart website with multiple products.
(ex.: mobile phone, furniture etc.,)
here mobile phone specification will cover
size of display
memory
operating system
camera etc.,
but for furniture - its specification is…

Sensa
- 383
- 3
- 6
- 20
0
votes
3 answers
Specification Pattern vs Specific Hibernate Query
My question is when to use a specification pattern, and when to use specific SQL query.
I understood that specific pattern need to collect whole collection and post filter using concrete specification. But i dont't understand the advantage in front…

Zenithar
- 240
- 6
- 22
0
votes
1 answer
Pattern for Frequently Updated Sorted Data
Let's say you're composing a blogging website. It displays recent blog posts by multiple authors sorted by "priority". Highest priority on top. Priority is determined by some formula involving:
how recently the post was published
how many…

S. Valmont
- 941
- 2
- 11
- 25
0
votes
2 answers
EF repository implementation to NHib
Below is an implementation for a generic repository desgned for use with Entity Framework. Ignoring its 'goodness' or 'badness' for this exercise...
What would the code look like for this in NHibernate?
Cheers,
Berryl
public class Repository :…

Berryl
- 12,471
- 22
- 98
- 182
-1
votes
3 answers
How to get an empty specification that does not filter or do something?
I have a base controller that should return a List of objects (and map them from DTO to business)
If the child controller decides to apply a specification (filter or include something) it can do it by overriding the GetSpecification() method.
But by…

serge
- 13,940
- 35
- 121
- 205
-1
votes
2 answers
Building a forms system using DDD
i'm building a form managment system, thats is, the system will contain many forms, will save them, and perform logic on them, I want to do it using the DDD approach.
I want to support easy form layout later on using ASP.NET MVC, so far i see the…

MindFold
- 771
- 5
- 16
-3
votes
1 answer
c# Process Complex Rules
I have a situation where it is possible for a user to develop complex requirements using a UI. Specifically it deals with authorising users to perform certain work based on their qualifications.
For example the user must have;
All of These:…

Ray
- 342
- 5
- 15