Content deleted Content added
Split alternative example into new Criticisms section, cleaned up examples with var keyword for clarity in both examples. Expanded Criticisms section with Anti-Pattern references, and follow-up commentary of the alternative example. |
Narky Blert (talk | contribs) Link to DAB page repaired |
||
Line 306:
The Specification Pattern could be considered a software [[Anti-pattern|Anti-Pattern]]:
* [[Cargo cult programming|Cargo Cult Programming]] - There lacks a well-defined purpose for this pattern, and there's no guide when to implement it or not. Also, see [[Law of the instrument]].
* [[Inner-platform effect]] - And() function which directly replicate [[Short-circuiting operator|&&]] in [[C#]]. Also, Not() and potentially more. Also, see [[Reinventing the wheel|Reinventing the square wheel]].
* [[Spaghetti code#Lasagna code|Spaghetti/Lasagna Code]] - Separate classes for each part of the specification fragments what could be a cohesive object. In the example above, OverDue is an extra layer between the Logic for SendToCollection and the OverDueSpecification implementation.
Most natural programming languages can accommodate ___domain-driven design with the core Object Oriented concepts.
|