Zend_Layout 的用途及 Web MVC 的介紹

星期二, 四月 1st, 2008

這邊1 有份 Web Seminar 的投影片,介紹了 Zend_Layout 設計所要解決的問題以及 Zend_Layout and Zend_View 的使用方法。

  • Zend_Layout 是 Two-Step-View Pattern 的實作
  • Zend_Layout 以 Decorator Pattern 實做(擴充 Zend_View)
  • Zend_Layout 可以幫助
    • DRY up code2
    • Best Practice
    • 良好的程式架構
    • 當變更架構及需求,較方便修改
  • 提供 Partial(), PartialLoop(), PlaceHolder(), Action() 等 Helper

其中有蠻多東西還看不是很懂

繼續閱讀 »

  1. Zend_Layout and Zend _View Enhancements Webinar []
  2. 我本來以為DRY up是榨乾的意思,查了一下應該是指 Don’t Repeat Yourself Principle,整句的意思是提升程式碼以 DRY 優化的程度,可參考 DRY Up Your CSS,當然這邊的 Code 不只是指 CSS []