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.
A specification pattern outlines a business rule that is combinable with other business rules. In this pattern, a unit of business logic inherits its functionality from the abstract aggregate Composite Specification class. The Composite Specification class has one function called IsSatisfiedBy that returns a boolean value. After instantiation, the specification is "chained" with other specifications, making new specifications easily maintainable, yet highly customizable business logic. Furthermore upon instantiation the business logic may, through method invocation or inversion of control, have its state altered in order to become a delegate of other classes such as a persistence repository.
Read more about Specification Pattern: Example of Use
Other articles related to "specification pattern, specifications, specification":
... Using these three specifications, we created a new specification called SendToCollection which will be satisfied when an invoice is overdue, when notices have been sent to ... new InCollectionSpecification // example of specification pattern logic chaining ISpecification SendToCollection = OverDue.And(NoticeSent).And(InCollection.Not) InvoiceCollection = Service.GetInvoices foreach (Invoic ...
Famous quotes containing the word pattern:
“It is just possible that the tensions in a novel of murder are the simplest and yet most complete pattern of the tensions on which we live in this generation.”
—Raymond Chandler (18881959)