Tuesday, March 25, 2008

Zend_Layout and Zend_View Enhancements Webinar

See Zend_Layout and Zend_View Enhancements Webinar at its new home on bradley-holt.com.

I missed the Zend_Layout and Zend_View Enhancements Webinar but the recorded Webinar and slides are now available. The Webinar covers a few of the cool new features that became available in the Zend Framework 1.5 release last week. These new features give web developers who are using Zend Framework a way to solve the problem of maintaining a consistent look-and-feel across multiple web pages. Solutions to this problem I've used in the past include:
  • Dreamweaver templates
  • PHP or Smarty includes
The problem with Dreamweaver templates is that a template change requires you to "burn" the change into all of the web pages that use the template. If you have lots of pages this process can get cumbersome or you may forget to upload all of the modified pages. Also, the developer in me cringes at the fact that we repeat the same (X)HTML code across multiple pages - even if Dreamweaver is handling this repetition for me. This just doesn't feel very DRY (Don't Repeat Yourself) to me.

PHP or Smarty includes help a lot with the DRY problem. However, you are now leaving it up to each script to decide where the page elements get included. You may accidentally include the header, for example, in the wrong place in one or more pages. Also, if you need to re-arrange the overall page structure you're stuck changing every single page.

Enter Zend_Layout and the Zend_View enhancements. Zend_View is an implementation of the two-step-vew design pattern and the Zend_View enhancements are a collection of view helpers that are useful alongside Zend_Layout. Check out the Webinar and read Matthew Weier O'Phinney's article on Using Zend_View Placeholders to Your Advantage.

No comments: