KnowHow

技術的なメモを中心にまとめます。
検索にて調べることができます。

Python基礎 オブジェクト指向 デザインパターン概要

登録日 :2025/09/19 05:43
カテゴリ :Python基礎

デザインパターンとは

過去のソフトウェア開発者が発見し、蓄積してきた設計のノウハウ集
(オブジェクト指向プログラミングにおいて、よく出会う問題とその解決策がまとめられている)

一般的にはGang of Four(GoF)と呼ばれる4人の開発者によってまとめられた23種類の設計パターン

デザインパターンの分類

オブジェクトの生成に関するパターン

  • Abstract Factory
  • Builder
  • Factory Method
  • Prototype
  • Singleton

プログラムの構造に関するパターン

  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Proxy

オブジェクトの振る舞いに関するパターン

  • Chain of REsponsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Template Method
  • Visitor