Thursday, 5 April 2007
Overview of Zend Framework |
| |
|
| |
Ben Ramsey shares with you the discoveries that he made while working on the Zend Framework (ZF). He says while upgrading the ZF from 0.8 Preview to 0.9.1 Beta, he made a few discoveries. He thinks this should help you as the manual for the Zend Framework is outdated and many of the examples given are either depreciated or no longer working.
The first thing he points out is a new way of using views, which is still undocumented in the manual. He says rather than creating a new Zend_View object, echo a call to its render () method and let the controller’s render () method do it. To do this, you need to follow a specific directory structure, he says. He shows how to create the views and demonstrates it with the help of code examples.
He says to use the views; you’ll need to initialize them in your controller. This can be done by creating an init () method and calling $this-> initView () from within it. This sets up the default view for your controller he says.
In conclusion, he says to note that Zend_Controller_Action:: initView () determines the location of the views directory on its own, so you don’t have to tell the application where your views are stored. It determines the location based on the controller directory specified for the current module in use. In this case, he uses the ‘default’ module. He also adds the Zend Framework also supports the use of different modules using different controller directories.
|
| |
|
Read the Post
|
| |
|
|
| |
|
|
| |
|