模板方法模式和抽象类的不同在与处理工作流程。
This differs from the Template Method pattern in that the abstract superclass doesn't handle workflow.
模板方法模式的这种用法提供了关注点的好的分离。
Such USES of the Template Method pattern offer good separation of concerns.
我说暴露文摘块模板方法模式是更好的在许多情况下。
I am saying exposing abstract blocks in template method pattern is better in many scenarios.
策略设计模式比模板方法模式花费了更多的工作去实现,但是它也更灵活。
The Strategy design pattern takes a little more work to implement than the Template Method pattern, but it is more flexible.
这稍微的更复杂去实现比用模板方法模式在类继承的版本中,但是也更灵活。
This is slightly more complex to implement than the version using concrete inheritance with the Template Method pattern, but is more flexible.
模板方法模式的另一个选择是策略模式,它抽取了多变的行为到一个接口中。
An alternative to the Template Method is the Strategy design pattern, which factors the variant behavior into an interface.
由于通常定义接口比定义类更好,模板方法模式通常被用于实现接口的策略。
As it's usually better to define types in interfaces rather than classes, the Template Method pattern is often used as a strategy to implement an interface.
由于模板方法模式是受保护的,而不是公共方法,调用者被分离从类实现的细节中。
As the template methods are protected, rather than public, callers are spared the details of the class's implementation.
在此介绍采用GOF的模板方法模式及采用回溯算法的模板方法模式的设计与实现。
Template method pattern of GOF and the realization of template method pattern in back tracing algorithm are introduced.
模板方法模式使得子类可以不改变一个算法的结构即可重定义该算法的某些特定步骤。
Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.
中介模式的“桥接”角色是使用模板方法模式实现的,它通过几种不同的基础通信技术,为远程服务调用提供支持。
The "bridge" role from the broker pattern was then implemented using the template method pattern to support remote service invocation using several different underlying communication technologies.
使用模板方法实现中介模式的桥接角色,这种做法提供了一种可以在将来添加外部通信备用类型的机制。
Using the template method for implementing the bridge role of the broker pattern provided a mechanism for adding alternative types of external communication in the future.
代码模板通常用来在方法中放置逻辑,可以选择是否依赖XDE模式中所定义的模板参数。
Code templates are used to put logic into methods, and may or may not depend on template parameters defined within a XDE pattern.
无论使用哪个工具进行建模,我都找到了创建这些模板的方法,以便重用整个体系结构模型或单个分析模式。
No matter which tool I'm using for modeling, I find a way to create these templates so that I can reuse whole architecture models or a simple analysis pattern.
使用符合快速应用程序开发理念的代码级模式、模板和模型转换方法,可以使实现加速。
Implementation can be accelerated using code-level patterns, templates, and model-transformation methods following a rapid application development paradigm.
命名惯例和基础模板在编程模式中常被忽视,然而它可能是最强大的方法。
Naming conventions and basic templates are the most overlooked software patterns, yet probably the most powerful.
总是使抽象父类实现一个接口。模板方法设计模式在框架设计中特别有价值(在这章的结尾讨论了)。
Always make the abstract parent class implement an interface. The Template Method design pattern is especially valuable in framework design (discussed towards the end of this chapter).
模板方法设计模式(gof)强调了一个普遍的问题:我们知道算法的每一步,并且知道他们执行的顺序,但是我们不知道怎么样去执行所有的这些步骤。
The Template Method design pattern (GoF) addresses a common problem: we know the steps of an algorithm and the order in which they should be performed, but don't know how to perform all of the steps.
因此对每一个人脸模板特征都可以用人工免疫系统中的模式识别方法生成一个特征评判集合,然后待识别的图象就可以用模版特征的评判集合来进行评判。
When an image is input we can use the set of template feature which is made by pattern recognition of AIS to decide which class it is.
该方法给出了元件故障模式的建立、元件间的关联方法、控制回路模板的建立方法以及故障树自动生成算法。
This method also presents how components failure model is constructed, how child fault trees are connected, how control loop template is formed as well as the flow chart of the fault tree synthesis.
该方法给出了元件故障模式的建立、元件间的关联方法、控制回路模板的建立方法以及故障树自动生成算法。
This method also presents how components failure model is constructed, how child fault trees are connected, how control loop template is formed as well as the flow chart of the fault tree synthesis.
应用推荐