Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Least favourite design pattern

OK, I'm not looking for anti-patterns - I'm looking for things that aren't really patterns, or perhaps patterns that have been abused.

My personal least favourite is the "Helper" pattern.

E.g. I need to create a SQL query, so call SQLQueryHelper. This needs to process some strings, so it in turn calls StringHelper. Etc., etc.

See - this isn't really a design pattern at all...

[edit] Don't you people who vote this down think you should add a constructive remark?

like image 489
PEELY Avatar asked Sep 26 '08 13:09

PEELY


2 Answers

'Manager' classes. e.g.

DataManager
BusinessLogicManager
WidgetManager

What the **** does 'Manager' mean? Be more specific! If your WidgetManager has so many Widget responsibilities that there is no more specific name, then break it down.

This is a conversation I have had too many times with myself when looking at old code.

like image 59
Matt Howells Avatar answered Nov 19 '22 15:11

Matt Howells


I think that Design Patterns should not be used blindly, implementing them simply because it's cool: they have a well-specified CONTEXT, and using them when appropriate MAY help, but in any other case they're just a waste of time, when not an hindrance to the correct system functioning.

like image 5
Manrico Corazzi Avatar answered Nov 19 '22 14:11

Manrico Corazzi