Routers. Plain and simple. What you can end up doing is "virtually"
providing the same URL combinations (with
http://site/admin/:module/:action) by using router definitions to
reroute requests to the appropriate controller in a module. So, you
could theoretically have your folder structure as:

\application
    \modules
        \authentication
            \controllers
                \IndexController.php
                \AdminController.php
        \othermodule

You'd probably normally access it by going to
http://site/authentication/admin/:action, but routers can allow you to
swap authentication and admin and the user wouldn't know the
difference.

The general idea behind doing it this way is you program your logic
(including admin logic) to remain in it's respective area. In other
words, you can keep your admin logic for  orders (as an example), in
the orders module instead of having a separate module dubbed "admin"
that contains logic from every different portion of your application.
It's much cleaner separation this way.
--
Chris Weldon

On Thu, Jan 29, 2009 at 3:36 AM, Anees <[email protected]> wrote:
>
> Hi,
>
> Before i came to zend i followed the following structure for keeping Both
> front end and Back end(admin) for a site separately
>
> \Site
>      \images
>     \index.php
>     \contents
>     \config.php
>     \other files.....
> Plus a folder
>     \admin
>           \index.php
>           \images
>           \contents and other files
>
> So 'Admin' side resides entirely separate from the front end in the \admin
> directory
>
> i just followed the same idea when i came to zend, but found difficulties
> when i used AUTH controller..
>
> i read about modules to separate the controllers with 'Modules'
> But i couldn't follow how exactly it should apply in the sites
>
> If anyone have idea about how to organize this
> please help
>
> Thanks in Advance
> Anees
> Regards
> Anees
> --
> View this message in context: 
> http://www.nabble.com/Directory-structure-in-zend-tp21723257p21723257.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>



-- 
Christopher Weldon
http://chrisweldon.net
[email protected]

Reply via email to