Hi Nathan,
Largely echoing Matthew:
>Will layouts still render when ViewRenderer::setNoRender(true) has
>been called? That's one of the things I like about the ZVE approach--
>you don't have to manipulate two helpers every time you want to
>disable view rendering.
I think the two helpers should be kept separate. It's an extra configuration
point but tighter coupling should generally be avoided if possible. There are
going to be cases where someone needs to be flexible about which is enabled or
not separately. This isn't so different from the ZVE approach where the options
were separate simply by virtue of being unrelated.
> Will Zend_Layout be limited to 1 layout per request?
I don't believe Zend_Layout is so limited - in addition you can couple this
with various ZVE measures which let you build a fairly complex View even if it
were the case.
>At first I was skeptical of Padriac Brady's talk of the controller-
>centricity of ZF, but I think he's onto something. Why shouldn't you
>be able to override the default layout from within a view script on a
>case by case basis? [By calling $this->setLayout('non-default.phtml')
>from a view.] Maybe I should be looking at implementing a full
>composite view or something if this sort of use case falls outside
>80/20.
Zend_Layout will offer a controller oriented take on Composite Views (using
sub-Requests) - granted I don't agree with that interpretation since it's
outside the normal practice in my experience (being a J2EE developer with a
strong preference for View Helpers) as something of a performance/bloat risk -
but it's wholly valid and should be sufficient for most cases. If the shoe
doesn't fit it's pretty easy to tackle a J2EE style Composite View approach
with a Zend_View subclass, and almost as easy to integrate this as custom
Smarty tags (as one would under JSP anyway if Tiles were missing). Most of the
supporting pieces outside ZVE Layouts will be available as standard afterall -
Partials/Placeholders etc. View Helpers reading from a Model don't even require
any ZF support so nothing has changed there either.
Matthew's improvements will keep the 80/20 more than satisfied ;).
Pádraic
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com
----- Original Message ----
From: Nathan Wright <[EMAIL PROTECTED]>
To: Matthew Weier O'Phinney <[EMAIL PROTECTED]>
Cc: Zend Framework General <[email protected]>
Sent: Tuesday, September 11, 2007 10:20:02 PM
Subject: Re: [fw-general] Zend_Layout Status ?
Will layouts still render when ViewRenderer::setNoRender(true) has
been called? That's one of the things I like about the ZVE approach--
you don't have to manipulate two helpers every time you want to
disable view rendering.
Will Zend_Layout be limited to 1 layout per request?
At first I was skeptical of Padriac Brady's talk of the controller-
centricity of ZF, but I think he's onto something. Why shouldn't you
be able to override the default layout from within a view script on a
case by case basis? [By calling $this->setLayout('non-default.phtml')
from a view.] Maybe I should be looking at implementing a full
composite view or something if this sort of use case falls outside
80/20.
Cheers,
ncw
On 11-Sep-07, at 12:35 PM, Matthew Weier O'Phinney wrote:
> -- Philip G <[EMAIL PROTECTED]> wrote
> (on Tuesday, 11 September 2007, 02:25 PM -0500):
>> On 8/18/07, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote:
>>
>> -- PotatoBob <[EMAIL PROTECTED]> wrote
>> (on Friday, 17 August 2007, 11:33 PM -0700):
>>>
>>> I sure hope default module layouts and a setConfig() feature are
>>> added to
>>> zend_layout :(
>>
>> Ralph and I were discussing Zend_Layout yesterday. The current
>> design
>> we're looking at would have a default layout, and allow
>> specifying the
>> layout to use either via a setLayout() accessor or as an
>> argument to a
>> render() method.
>>
>>
>>
>> Just jumping in to put my two cents in -- this is exactly what I'm
>> looking for (setLayout() option). I originally built a layout
>> support,
>> of this exact same model, on top of Zend_View in ZF ~0.6. In my
>> research to figure out Zend_View changes, I ran across this post.
>> I'm
>> still figuring out what changed in Zend_View, but this is what I'm
>> looking for. I'm actually rather shocked this option wasn't added
>> with
>> 1.0.
>
> To be clear, setLayout() will be part of a separate class,
> Zend_Layout.
> Zend_View will not have any concept of layouts by itself.
>
> Layouts as created in most frameworks are simply views with
> placeholders
> for content -- in other words, a decorator for an application view.
> Zend_Layout will operate in a similar fashion, and register a plugin
> with dispatchLoopShutdown() to perform its work.
>
> Layout support was not done for 1.0.0 as we'd only just finalized
> things
> like integrated view support for controllers (via the ViewRenderer),
> and action helpers -- the building blocks on which a layout solution
> will be based.
>
> --
> Matthew Weier O'Phinney
> PHP Developer | [EMAIL PROTECTED]
> Zend - The PHP Company | http://www.zend.com/
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC