Design Patterns used in Zend Framework

Victor Farazdagi picture Victor Farazdagi · Nov 12, 2010 · Viewed 9.1k times · Source

I am preparing talk about general architecture of Zend Framework, and wanted to summarize Design Patterns used in it.

I believe it will be beneficial both for those knowing ZF and learning DPs, and for those knowing DPs and learning ZF. In a former case, one would be able to see real-world application of patterns, and get a better comprehension of framework in the second.

Even brief answers in a form Zend_Contoller_Front: Singleton are good enough, if a little elaboration is provided (for some not-so-obvious cases) it will be even better.

I am primary interested in GoF patterns, as they seem to be the starting point of any DP-adventure.

UPD: Not directly related, but for those who know Java there's extremely complete answer for GoF's DP examples found in Java core.

Answer

Gordon picture Gordon · Nov 12, 2010

Since this is a CW now, I'll add the patterns I already gave in the comments:

  • Zend_Controller_Front
    • Singleton
    • FrontController
  • Zend_Db_Table
    • Table Data Gateway
  • Zend_Log
    • Factory Method
    • Adapter
    • Composite
  • Zend_Form
    • Composite
    • Decorators
  • Zend_Filter and Zend_Validator
    • Strategy