Guys, I'm developing resource manager for my game. It should load resource, cache them and return pointer by passed key. I'm using a few maps which handles different resources types and a few functions for each stored type. How bad is that? In other words, I have ~3 functions which do the same but with different types.
Design patterns are fine to use when they match what you need. But what you are suggesting is "you must have patterns*, you must find some patterns to inject into your code, you must find a use for these patterns"
@Ockonal: my point is that "Manager" classes never ever make sense. It's a sloppy "I haven't really thought about what this class should do, so I'll name it a manager" kind of thing
@Ockonal in a factory you have an abstract class as interface (or API) and then you implement the different types.. when you add or remove types your api does not need to change
Does you DisplayManager put stuff on the screen? Call it Renderer. Does your ConfigManager allow you to access configuration options? Call it that, a "Configuration".
each class should have one responsibility. And that is why manager classes are bad. They're where you put all the responsibilities you havent' really thought about
and then you end up with messy, bloated classes which mix 8 different areas of responsibility
@Ockonal it's an expression meaning basically "start over". Redesign the class