본문 바로가기
Computer Science

Prototype Pattern

by OKOK 2021. 7. 30.

Purpose

  • Create objects based upon a template of an existing objects through cloning.

 

Use When

  • Composition, creation, and representation of objects should be decoupled from a system.
  • Classes to be created are specified at runtime.
  • Objects or object structures are required that are identical or closely resemble other existing objects or object structures.
  • The initial creation of each object is an expensive operation.
  • When to avoid building a class hierarchy of factories that parallels the class hierarchy of products.

'Computer Science' 카테고리의 다른 글

얄팍한 코딩 사전 - 객체지향 디자인패턴1  (0) 2021.08.01
점프투 자바 목차  (0) 2021.08.01
Chain-of-Responsibility Pattern  (0) 2021.07.30
Proxy Pattern  (0) 2021.07.30
Design Pattern Study  (0) 2021.07.29

댓글