Thursday, February 24, 2011

Re: requestAction question

Based on your description I do not see need in requestAction at all.
If all you need is 1 model call and one element output you can add
data call to appropriate actions or beforeFilter/beforeRender and add
element output to the view/layout. Just one more line of code in
comparison with requestAction.

On 25 фев, 06:21, "Krissy Masters" <naked.cake.ba...@gmail.com> wrote:
> Maybe I read it wrong back in the day but something idles in my head about
> requestAction being bad. Is this true or still in effect? I am using 1.3.7
> and I think I remember reading back in 1.2 its better to not use that
> function.
>
> "If used without caching requestAction can lead to poor performance. It is
> rarely appropriate to use in a controller or model."
>
> I have 1 element on 3 pages where I simply need to grab 4 fields from a db
> for the element. The element is loaded originally on the first page left
> side navigation column, and links load content into the main column so the
> element is never refreshed since its on the side nav column except if
> someone "open in new tab / window" on the link so the element has no data
> because its originally loaded on the main page. So rather than build that
> data call into each of those 3 pages I figured request would be the best
> option.
>
> My Picasso below :)
>
> Side Col                  |       Main Col
> ___________________________________________________________________
> | nav => loads into main  |   content gets loaded here via ajax
> |------------------------------------------------------------------|
> |
> | element                 |
> |
> ____________________________________________________________________
>
> Just looking for some input on the matter.
>
> Thanks,
>
> K

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: