I’m not that good with OOP Patterns, so I better ask before I code in the wrong direction.
the scenario is quite simple, I have a DB table which holds different types of text (designated by a type field), based on that type I need a class (I usually fetch the DB result in a class) to use different output templates.
I’m pretty sure there is a Pattern for exactly that purpose, just which one? Strategy, State, Template or something other?
PS. a good reference is always appreciated.
the scenario is quite simple, I have a DB table which holds different types of text (designated by a type field), based on that type I need a class (I usually fetch the DB result in a class) to use different output templates.
I’m pretty sure there is a Pattern for exactly that purpose, just which one? Strategy, State, Template or something other?
PS. a good reference is always appreciated.
Comment