I would like to add something to Chad's remarks. I hang out a lot in
#zftalk on freenode. As such, I see questions about how to do layouts on
a daily basis. People new to the framework don't seem to understand what
viewRenderer does, and how to wrap it's results into a layout. Ralph
Schindler, who is often in #zftalk, kindly helps them and explains about
his solution. He's even nice enough to provide references to Pádraic's
point of view too.
For all noobs out there, it would be extremely handy if there was some
kind of reference as to what a layout is/does, and on how to implement
them. This means that there should at least be a "final" solution, even
if it isn't available as a standard part of the framework. I haven't
decided between the two proposals myself, but as far as I am concerned
either one will do, with decent documentation and a little support.
The 80/20 rule will probably state that layouts should be both easy to
understand and easy to implement (but retain the option of becoming
extremely complex ;)). There's nothing but confusion today. Ever since
viewRenderer got introduced I've been explaining to people "no, it will
render a view in controllerName/actionName.phtml, you'll have to render
your site-wide template yourself", then referring them to a proposal or
vague blog post. I wouldn't be surprised if people gave up on the
framework because of the confusing way they have to put their sites
together.
It shouldn't be too hard to come to some kind of agreement on this...
Another noob (although less lovable),
Maurice
codeangel wrote:
I thought a viewpoint of a MVC "noobie" might be appropriate here. I pretty
much been learning MVC and design patterns within the last year or so. Most of my
understanding of MVC has resulted from playing with Zend Framework since 0.2. The biggest
issue I had was understanding how to do layouts with Zend_View, I have solved it in my
own, unelegant, noobie way. But it never felt quite right to me. Now I see that there
are proposals for two Layout classes that would have solved this very problem. I feel
that these classes have been missing from the Framework longer than they should.
1.0GA is a very important release, most people will base their opinion on the
quality of Zend Framework during this release. In some ways I feel that Zend
Framework's reputation is at stake here. 1.1 or so might come a little to late
to win back favor. So I'm begging for those against adding a Zend_Layout in
1.0 to reconsider. Feature freezes are set in ideals, not in stone.
Your lovable noob,
Chad
--
Maurice Fonk
[EMAIL PROTECTED]
http://naneau.nl/
Scio me nihil scire