Now what if these modules were external .. meaning you downloaded them from a third party (which we all hope to do some day w/ real distributed modules).

And you wanted to add an additional custom action to that module.

http://www.site.com/admin/user/profile/add-twitter-account <http://www.site.com/admin/user/profile/view>

Another idea.. is instead of using routers, you forwarded the action to the appropriate controller.

So the AdminProfileController would still live in the admin module, but would forward all requests, besides custom actions, to a User Controller. This allows the admin module to always be in control. If it can't handle it pass it down .. in true HMVC fashion ;)

I guess you would have to balance the overhead of the router versus the dispatching loop.

On 5/12/2010 9:53 AM, Diego Potapczuk wrote:
Like Nicolas said, a good way to solve this is using router.

Example:

User module
    ProfileController
        viewAction

http://www.site.com/user/profile/view

User module
    AdminProfileController
       viewAction

http://www.site.com/admin/user/profile/view (via router redirects to the right module/controller)



::: Diego Potapczuk


On Wed, May 12, 2010 at 10:42 AM, Nicolas Grevet <[email protected] <mailto:[email protected]>> wrote:

    It depends, you might want to implement it in another way, because
    the 'admin module' point of view kinda defeats the purpose of
    modules in itself. What's the point to have module if when you
    disable them, their administration panel is still included in
    another one? Plus, it prevents you from building 'plug and play'
    modules. On our current project, we implemented an architecture
    where every module brings his own little part of the
    administration area into an aggregating module. We had to deal
    with Zend_Controller of course, but it really wasn't that hard
    since you can handle most of the work through the router and a few
    checks here and there.

    Regards,
    -- Nicolas Grevet


    Sergio Rinaudo wrote:

        Hi,
        from my point of view 'admin' is a module.
        In this discussion

        
*http://zend-framework-community.634137.n4.nabble.com/ZF1-8-Switching-layouts-between-modules-td659665.html
        *
        there is a clear example of what do do using a plugin.
        Hope it helps.

        Bye

         *
        *
        ------------------------------------------------------------------------
        Tanti account di posta? Unisci tutto sotto Hotmail
        <http://www.windowslive.it/hotmail/UnicaCasellaDiPosta.aspx>


Reply via email to