Hello All folks this is my first post.
I'm using cakephp for a intranet project in my company.
In my opinion the requestAction is the best method to mantain code
readability with large projects.
In my approach:
1. Every controller maps its own model for CRUD:
2. Expose methods like read, find, generatelist etc for interprocess
call.
for example in {Users Controller} that uses {User Model} I have the
function read($id) to return data to everyone needs a user record.
Really you don't need to declare the function in every controller but
you can easily  move the logic in app_controller with something like

function read( $id=null ) {
  // Its only an example
  if($id) {
    $this->{$this-modelclass}->id = $id;
    return $this->{$this-modelclass}->read();
  }
  return null;
}

It's my opinion would be glad to see yours
cheers.
Marco

On Jan 19, 2:53 am, "nate" <[EMAIL PROTECTED]> wrote:
> I generally discourage the use ofrequestActionunless you have some
> specific reason to do so, and there are a few, i.e. if view code is
> involved (well, in that case you'd probably be using it *in* a view
> anyway).
>
> Basically, if you have a set of methods that could logically be grouped
> in an object, a component is the way to go.  Otherwise, go with 
> anAppControllermethod.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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