DEV Community

Discussion on: Design Patterns: use or not to use

Collapse
 
evilsoft profile image
Ian Hofmann-Hicks • Edited

Personally I think people put to much stock in Design Patterns as a teaching tool. Before I moved away from OOP a few years ago, I was really big on design patterns, but not for teaching, for communication.

If you code for years and years chances are you have unknowingly implemented just about all patterns. Many experiences I have had when describing a pattern to either an individual or a group, just about every time they will respond with "Oh yeah, I do that all the time" and my canned response to that is, "Awesome, well now you have a name for it"

Because of years and years of this, I switched my motivation of teaching them from:

"Teaching devs to identify and refactor/design against a given pattern"

to:

"Provide devs with a simple, condensed vocabulary to explain a system or part of a system"

For instance I could provide a dev with complicated flow/class diagrams and waste everybody's time in a protracted design meeting to describe how we could approach a challenge.

OR I can make a statement like "Well, this could be a Director using a Composite on the Manifest.

Just my 2-cents

EDIT: oh I see @simonhaisz already posted something along these lines.