On Mon, Nov 24, 2008 at 3:20 PM, Alexander Tamm <[EMAIL PROTECTED]> wrote:

> Andrew Rodland wrote:
>
>> On Sunday 23 November 2008 03:29:11 am Alexander Tamm wrote:
>>
>
>  1) I could always populate the stash in auto() and call the
>>> corresponding Mason component when needed. This means fetching some data
>>> even if it isn't needed.
>>>
>>
>  This version, except that instead of doing it in auto, you do it in end or
>> in an ActionClass, only when you know you're going to need it (that is,
>> you're actually sending back a page that includes the menu, and not a
>> redirect or a downloadable file or whatever else).
>>
>
> Do you have a rationale behind this suggestion? I'm not very keen on
> this one, since a change in the presentation logic can require a change
> in the controller.
>

The suggestion was for you populate the stash near the end of the request,
before calling out to your view, so as to avoid doing the work when it is
not necessary.  That's why he suggested an ActionClass, or the end method.

Remember, the view is typically called from within the end() action, or form
an ActionClass like RenderView, which itself runs during the "lifecycle" of
the end() action.

Len.
-- 
[EMAIL PROTECTED]   - 614-404-4214
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to