Compound Pattern on Template Method and Abstract Factory
CSTR:
Author:
Affiliation:

Clc Number:

Fund Project:

  • Article
  • |
  • Figures
  • |
  • Metrics
  • |
  • Reference
  • |
  • Related
  • |
  • Cited by
  • |
  • Materials
  • |
  • Comments
    Abstract:

    Object-oriented programming is increasingly pursuing the reusability and flexibility of the program. It is difficult for programmers with less experience to obtain reusable and flexible programs directly. The software design pattern is to extract the experience of object-oriented programmers, and then to summarize them. In the template method pattern, the parent class defines an algorithm framework, uses the template method to specify the execution steps of the algorithm, and delays the variable steps to the subclass implementation. Each different implementation needs to define a new subclass. The system will be larger with maintainability and readability. Therefore, embedding the abstract factory pattern into the template method pattern forms a composite pattern. The core of the composite pattern design is to provide an interface for creating objects for each variable step that is delayed to the subclass. The interface is for a complete definition of product family. The composite mode not only ensures the stability of the algorithm structure, but also separates the specific implementation class, which enhances the robustness, reusability and flexibility of the program.

    Reference
    Related
    Cited by
Get Citation

林欣欣,郭元术,运杰伦,苏欣欣.基于模板方法与抽象工厂的复合模式.计算机系统应用,2020,29(6):218-223

Copy
Share
Article Metrics
  • Abstract:
  • PDF:
  • HTML:
  • Cited by:
History
  • Received:November 05,2019
  • Revised:November 28,2019
  • Adopted:
  • Online: June 12,2020
  • Published:
Article QR Code
You are the firstVisitors
Copyright: Institute of Software, Chinese Academy of Sciences Beijing ICP No. 05046678-3
Address:4# South Fourth Street, Zhongguancun,Haidian, Beijing,Postal Code:100190
Phone:010-62661041 Fax: Email:csa (a) iscas.ac.cn
Technical Support:Beijing Qinyun Technology Development Co., Ltd.

Beijing Public Network Security No. 11040202500063