4 ms·
You mean the template pattern as described in GOF? Very nice nice and underused pattern, but sometimes it is better to use some event based system as mentioned
by st0p 14y ago
You mean the template pattern as described in GOF? Very nice nice and underused pattern, but sometimes it is better to use some event based system as mentioned in the article and sometimes it is better to just be rude and overwrite a method (very nice metaphore BTW).
More "traditional" OO like C++ or Java let the developer choose. The "traditional" way gives you more flexibility and more ways to shoot yourself in your foot.
- MartinCron 14y agoYou mean the template pattern as described in GOF? Very nice nice and underused pattern The template pattern was when I finally "got" design patterns, realizing that they were ways of describing and communicating (some) things that I was already doing.
- helpermethod 14y agoActually I think when Java will finally introduce anonymous functions the Template Pattern will be obsolete. The strategy pattern is IMHO much more flexible and can be used everywhere where the template pattern is used.