requestAction() is a bit seductive. It can look like a simple solution
to a lot of things but the problem (that you notice later on) is that
is has a high "cost" in the processing overhead and in that you don't
improve your design instead of using the "quick fix".

When requestAction() is called you are effectively making a new
request more or less as you would by refreshing the browser. You are
starting up the router and dispatcher again. You are instantiating a
new controller, loading new Models, querying the database. And, worst
of all as I understand it, you are often doing a full render of an
extra View. All this results in a very costly feature.

There are times when requestAction is a good tool (the only tool?) but
they are quite few. But without knowing your application I can't say
if you have a justified situation or not. I always feel dutifully
ashamed each time i use this feature which forces me to think if I
can't get around my problem some other way :)

In my current project I actually have a few but in those cases doing
without it is too complicated for my taste and in only one instance is
the processing overhead an issue.

/Martin


On Jan 15, 3:05 pm, "Mario Cesar" <[email protected]> wrote:
> teknoid, why is a bad idea ???
>
> --- p.s. It is almost always a bad idea to use requestAction() ;)
>
> On Wed, Jan 14, 2009 at 2:29 PM, teknoid <[email protected]> wrote:
>
> > Any params can be passed like: /controller/action/param1/param2/param3
> > Or as named params: /controller/action/name:bob/city:paris/
> > account:active
>
> > to see the params in your controller pr($this->params)
>
> > p.s. It is almost always a bad idea to use requestAction() ;)
>
> > On Jan 14, 9:55 am, Mario Cesar <[email protected]> wrote:
> > > hi!
> > > i have parameters with / ex '2008/2,' '2008/1'
> > > but the cake read only 2008
> > > how can i pass the /???
>
> > > i'm using
> > > $turma = 'qqq/w';
> > > $this->requestAction("/turmasDisciplinasHorarios/getDisciplinaTurma/
> > > $turma/$filial/$disciplina");
>
> > > someone can help me?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to