Modelus Logo

Modelus Specification

Modelus Specification is an implementation of the Specification Pattern in .NET. The pattern has been originally described by Eric Evans and Martin Fowler and is referenced in Eric's book "Domain Driven Design".

Intention

  1. Express a domain model using deep and powerful ubiquitous domain language.
  2. Make hidden domain complexities explicit. Increase understandability and flexibility of design.
  3. Support declarative style of design, intention-revealing interfaces, and side-effect-free implementations.

Design Objectives

  1. Allow domain rules to be extracted out of conditional logic and made explicit in a domain model.
  2. Allow complex rules to be build out of simple elements using logical operations of Boolean algebra.

Applicability

Use Specification when you need:
  1. To validate object eligibility for a certain benefit or responsibility.
  2. To select an object from a collection based on a given selection criteria.
  3. To create a new object to fit a particular need or purpose.

Consequences

Introducing specifications into a domain model deepens team's understanding of the domain and uncovers hidden opportunities to increase business value.

Be mindful of the fact that creating irrelevant or weak concepts only clutters the system's core responsibilities. Thus, Specification is not a replacement for every conditional statement we may have in our code.

Alternatives

  1. Simple conditional statements - hide functionality behind code and will miss opportunities to deepen our understanding of the domain.
  2. Rule engines - have potential for a more powerful and flexible solution but are more expensive to develop.

License

The Modelus Specification source code, binaries, and documentation are distributed under the Apache License 2.0.

Questions

Have a question about the implementation? Need help? Please direct your questions and comments to Aleh Matus at info@modelus.com.

What our clients say...

I have always been impressed by their technical expertise and their quality of work

"I have always been impressed by the technical expertise and the quality of work that has been provided by Modelus. Whether application or database design, .NET or Java coding, I am confident that the delivered product will be what was promised. In addition, Modelus makes it a priority to deliver according to agreed upon timelines."
Michael Dalton
Boston Scientific
Maple Grove  MN