need advice on Zend framework Application architecture, or say approach dealing with modules

Posted by simple on Stack Overflow See other posts from Stack Overflow or by simple
Published on 2010-04-01T09:20:04Z Indexed on 2010/04/01 9:23 UTC
Read the original article Hit count: 270

Filed under:
|
|
|

Let me start with the things that I did and how am I using some things to get results

I have set up modular structure as:

application/
    /configs
    /layouts
    /models
    /modules
         /users
         /profile
             /frontend
             /backend
                 /controllers
                 /views
              ....
  1. I write a plugin that does addes changes with FrontController->setModuleControllerDirectoryName() FrontController->addModuleDirectory() and It is all good I have a changed all the directories according weather admin page is requested in the url or not (it is some thing like /admin/some/some)

  2. Let's say I have a single layout for anything that is related to Profile viewing , in this case the "Profile" module. The Profile layout is divided into three parts

    alt text

In the layout I was pulling out the Profile/PhotoController 's index action with a action()

$this->action('index', 'photo', 'profile');

Then I have faced few issues 1. Can get passed Params inside the Photo Controller when calling ( profile/profile/index); 2. found out that helper Action() is evil cause it starts another dispatching loop =) --- and now I am thinking that my approach on plugging in controllers modules into layout also evil =). anyhow how Should I deal with plugging in some controllers (another module controllers) into the layout ?

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework