News for hackers. Stuff that matters.
Re:Using the Specification Pattern to Build a Data-Driven Ru... by NicoJuicy on Tuesday March 24, 2020 @11:26AM (#22675357)
Well, then your use-case is different than mine. Since I mostly use specification pattern on top of a orm layer.

Orm's support expression trees ( eg, nhibernate,...)

So the specifications pattern for my use-case require expression trees.

There are workarounds ofc, but translating specifications to Sql is not the desired use-case of the pattern.

Specifications make it easy to have a 100% equal business filter ( that translate it to Sql through the ORM) and making it testable.

- Specification.AssertAll(resultset, "not all elements are valid according to this specification");

( Using pseudocode )

There are no comments on this comment yet.