views:

127

answers:

2

Although not a pure OOD principle - should DRY also be included when thinking about SOLID principles? If not - why not?

+2  A: 

I think "DRY" is probably not specific enough to make it into SOLID. "DRY" might be an underlying principle of the other principles, and it applies to any kind of development, not just object-oriented development, like SOLID does.

Dave Markle
+3  A: 

It's a bit like asking why you shouldn't add a monkey-wrench to a basket of apples: they're not really the same thing.

SOLID is a set of principles that specifically address object-oriented design.

DRY is, I'd say, somewhat orthogonal to those - it's a programming principle that can apply to anything you write.

(Having said that, the acronym is almost too good to pass up on)

Mike Woodhouse