Hi,

I don't remember where I have seen something like this but take a look at the proposals section (MVC), there is something about One file per action, I think

regards,

fred


Xavier Vidal Piera a écrit :
You can nest controllers to isolate actions if you want,

let's say i have:

Autentication
    LoginController (with 2 actions, "index" and "checkuser")
    LogoutController
News
    ListController
    NewController
...
IndexControlller

To call these controllers you can do:

http://www.foo.com/autentication_login/
http://www.foo.com/autentication_login/checkuser
http://www.foo.com/news_list/
etc..

Remember to declare the classes like this:

class Autentication_LoginController extends Zend_Controller_Action
{
    public function IndexAction() {}
    public function CheckuserAction() {}
}

....


Hope it helps



2007/4/20, agatone < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:


    I'm sorry if this was already discussed but i could find any
    topics about it.
    Let's say we have in our controllers folder this action file :

    class IndexController extends Zend_Controller_Action {
      function indexAction() { ... }
      function addAction() { ... }
      function removeAction() { ... }
      function editAction() { ... }
      function deleteAction() { ...}
      .... etc. ...
    }

    So at all this actions file could easily have 500+ lines, what is
    (in my
    oponion) very bad.
    Wouldn't be easier if actions could be in separate files - more
    simple
    structure ... ?

    Any ideas ?

    --
    View this message in context:
    http://www.nabble.com/Action-files-tf3612069s16154.html#a10094063
    <http://www.nabble.com/Action-files-tf3612069s16154.html#a10094063>
    Sent from the Zend Framework mailing list archive at Nabble.com
    <http://Nabble.com>.




--
Xavier Vidal Piera
Enginyer Tècnic Informàtic de Gestió
Tècnic Especialista Informàtic d'equips
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
610.68.41.78

Reply via email to