dispatch cycle several times is the major point why not to use the
ActionStack. The major bottleneck is and will always be the database for
high traffic websites.
We serve http://www.godmode-trader.de/, for instance, the home page is made
up of 30 actions put onto the ActionStack. This stack is configured via an
XML file for each page we serve (dynamic or static). The XML files implement
inheritance so that you need to define the navigationAction() only once
e.g.. The good thing about it: If you like to change the layout, the
parameters of certain actions or if you like to add additional content
modules for a specific page you just edit the XML file. A Layout & Content
Manager is built on top of that so you do not need to touch the files at
all.
Jon Whitcraft-2 wrote:
>
> What I was told a while ago was the using the ActionStack or the
> $this->action() view helper is like running another request though. I
> reprocesses your dispatch loop and all it's plug-ins. This is really
> expensive for sites that have a lot of traffic as it has to run the
> dispatch loop x number of times.
>
> If you actually look at the performance of doing it with the action
> stack vs doing it with custom view helpers you actually see a rise in
> pages per second served.
> --
> Zend Certified EngineerJon Whitcraft
> Zend Certified Engineer
> jwhitcraft@mac.com <mailto:jwhitcraft@mac.com>
>
>
>
> Jurian Sluiman wrote:
>> I have almost the same usage. I create "pages" in XML which are decoupled
>> from
>> the modules. I.e. a contact page uses the module "text" to render some
>> text
>> and the module "contact" for the contact form. A page "Threecolumns" is
>> just
>> as simple as three times the module "text" being called. But there are
>> pages
>> ("blog") which just contains the blog module.
>>
>> I have posted about this issue some time ago, but nobody is able to
>> justify
>> why you shouldn't use the action helper / stack in this context. Of
>> course you
>> shouldn't use the stack for breadcrumbs or other *very simple*
>> placeholders
>> (like your shopping cart inside a storefront module).
>>
>> But these "blocks" where Christian (I think) and I am talking about are
>> much
>> more than some simple placeholders. So I don't seem how you're able to
>> use
>> view helpers with very complex situations.
>>
>> Regards, Jurian
>>
>
>
--
View this message in context: http://n4.nabble.com/PageController-ActionStack-vs-Simple-MVC-tp948403p948548.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论