requestAction opinion: Use requestAction when necessary don't try to
make inter-controller calls.

Hi Troy,

Regarding a graphic: I looked at creating a more detailed one, but
didn´t find the time to comple it yet. So my attempt to chip something
pretty back to Cake failed :). There were a couple of simpler version
floating around, can´t remember the links.

Regarding processing order: Reading through the dispacher code only
takes an hour or so (to get the jist of what it's doing) and as such I
would thoroughly second mouth's recommendation to just look at the
code.

Regarding direct controller calls: I don´t quite follow the logic of
calling another controller method directly.. it would save (basically)
only the time the route takes to decide what to do, and would either
mean duplicating much of what the dispacher already takes care of or
running the risk of missing models/components/helpers if you tried to
bypass it. The time saving would surly be minimal, no? If a
cross-controller call is considered, before anything I think it's worth
asking if it's really necessary. If the controler method is just
querying a model - just use the model, if the controller method does
something more complex - should the code be in the model, or
'outsorced' to a component or inherited to the app_controller? If the
answer at the end of all that is that the code should stay in the
target controller, a requestAction call is the way forwards - anything
else invites errors (IMHO).

AJAX and requestAction: I don't quite follow why AJAX keeps getting
referred to in connection with requestAction, could someone explain? I
see a pseudo analogy (in that requestAction can be used to build up a
complex page from it's component parts, and AJAX calls can be used to
update a specific div of a page), but requestAction is on the server,
and AJAX calls come from the web. There isn´t an inbuilt 1=1
relationship between requestAction and AJAX calls and as such I find
myself guessing what is meant when these 2 terms are stuck together.

Anyway, it's useful to discuss,

Cheers,

AD7six


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to