由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - Dsign Pattern: template method vs strategy
相关主题
Design Pattern: Factory method vs Abstract factoryC++ Q88: nested non-template class
再问Amazon的card设计C++ Q90 - Q92
design pattern大家怎么准备?请问 design pattern 有用吗》?
关于 C++ design pattern 的资料关于设计题的准备,个人经验。
C++ Q73: template (skillport)面试常考哪些java的design pattern
design类题目大家是怎么准备的啊?工作中,Design Pattern使用的多吗?
推荐两本OOD和Design Pattern的入门电子书说说我的面试经验(3)
求head_first_design_patterns,有包子谢我来推荐一个改简历的地方
相关话题的讨论汇总
话题: strategy话题: template话题: method话题: pattern话题: dsign
进入JobHunting版参与讨论
1 (共1页)
q****x
发帖数: 7404
1
can any daniu concisely describe their difference with example?
google doesn't return any good refernce.
l*****a
发帖数: 14598
2
template method will call virtual function inside it
strategy means u can change the way to do something

【在 q****x 的大作中提到】
: can any daniu concisely describe their difference with example?
: google doesn't return any good refernce.

b*2
发帖数: 94
3
template is like a trigger, which package several abstract methods.
Different sub-class could have different implementation. And our cute
trigger will launch all those methods.
Strategy is pretty strightforward, get the algorithm based on the context.
q****x
发帖数: 7404
4
in case of template, if there's only one abstract method in the package,
will it be also a strategy?

【在 b*2 的大作中提到】
: template is like a trigger, which package several abstract methods.
: Different sub-class could have different implementation. And our cute
: trigger will launch all those methods.
: Strategy is pretty strightforward, get the algorithm based on the context.

1 (共1页)
进入JobHunting版参与讨论
相关主题
我来推荐一个改简历的地方C++ Q73: template (skillport)
电话面试经验教训design类题目大家是怎么准备的啊?
Business Analyst opening at Riotgames (转载)推荐两本OOD和Design Pattern的入门电子书
一个小时的面试,二十分钟就结束了,是不是挂了?求head_first_design_patterns,有包子谢
Design Pattern: Factory method vs Abstract factoryC++ Q88: nested non-template class
再问Amazon的card设计C++ Q90 - Q92
design pattern大家怎么准备?请问 design pattern 有用吗》?
关于 C++ design pattern 的资料关于设计题的准备,个人经验。
相关话题的讨论汇总
话题: strategy话题: template话题: method话题: pattern话题: dsign