GithubHelp home page GithubHelp logo

designpatternphp's Introduction

#設計模式 for PHP

引言

目前公司所接觸的專案與開發項目規模越來越大,怎樣設計出可以滿足多變的修改與擴充需求的系統架構,已經變成一個重要的課題。而Design Pattern則是解決上述需求的一個解決方法。它是對軟體設計中普遍存在(反覆出現)的各種問題,所提出的解決方案。它可以運用在大多數物件導向的程式語言中,它能夠避免會引起麻煩的緊耦合,以增強軟體設計面對並適應變化的能力。

有鑒於目前市面上現有書籍資料較為艱澀難懂,網路資料較為鬆散雜亂。因此在筆者學習的Design Pattern的過程中,整理出本筆記,希望能夠幫助大家能夠不用花這麼多學習時間,就可以比較容易的理解Design Pattern,並且運用在實際的專案上。

由於本筆記的資料皆採自與市面出版書籍與網路資料,由於筆者本身能力有限,筆記裡面也許有說明不清楚或是不正確的地方,歡迎大家提出問題與為本筆記勘誤。信箱: [email protected]

目前有收錄的設計模式有:

Creational Patterns(生成模式)

  • Simple Factory(簡單工廠模式)
  • Factory Method(工廠方法模式)
  • Abstract Factory(抽象工廠模式)
  • Builder(生成器模式)
  • Prototype(原型模式)
  • Singleton(單例模式)

Structural Patterns(結構模式)

  • Adapter(轉接器模式)
  • Bridge(橋梁模式)
  • Composite(合成模式)
  • Decorator(裝飾模式)
  • Façade(表象模式)
  • Flyweight(享元模式)
  • Proxy(代理人模式)

Behavioral Patterns(行為模式):

  • Chain of Responsibility(責任鍊模式)
  • Command(命令模式)
  • Interpreter(解釋器模式)
  • Iterator(迭代器模式)
  • Mediator(中介者模式)
  • Memento(備忘錄模式)
  • Observer(觀察者模式)
  • State(狀態模式)
  • Strategy(策略模式)
  • Template Method(樣板方法模式)
  • Visitor(訪客模式)

designpatternphp's People

Contributors

hank7444 avatar

Watchers

James Cloos avatar alika406 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.