2008年10月1日星期三

Re: [fw-mvc] Sharing View Helpers Across Modules

I prefer the last option, because I think it's easier to maintain in
comparison to the second one (especially if you are going to subclass
further view-helpers later...)

Greetings
Timo


SiCo007 wrote:
>
> This is really just a query on performance, I want 1 module to use a
> particular view helper from another module. i.e. products module has a
> link view helper to aid the creation of links to particular products. Now
> the shop module containing the shopping basket needs access to these
> product links.
>
> I see two main options and I'm interested in the pros and cons performance
> (or anything else) wise.
>
> 1) Add the desired modules view helper path to the stack (could
> potentially add a lot of paths).
> 2) Sub class the view helper in the calling module... i.e.
> "Shop_View_Helper_ProductLink extends Product_View_Helper_ProductLink" -
> Basically a blank class simply allowing access to the other modules
> helper.
> 3) Create all link helpers in my lib and just allow access to all modules.
>
> How do people go about this? Am I thinking about it too much?!
>
> Thanks
>

--
View this message in context: http://www.nabble.com/Sharing-View-Helpers-Across-Modules-tp19765185p19768231.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: