<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Why the Zend Framework Actionstack is Evil</title>
	<atom:link href="http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/</link>
	<description>Randomness will get you everywhere.</description>
	<lastBuildDate>Sat, 04 Feb 2012 15:24:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Judy</title>
		<link>http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/comment-page-1/#comment-955</link>
		<dc:creator>Judy</dc:creator>
		<pubDate>Mon, 15 Aug 2011 15:18:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.rmauger.co.uk/?p=45#comment-955</guid>
		<description>Kieran said: &lt;blockquote&gt;Well said. When I started out with ZF I encountered the Actionstack, and a whole load of problems – many of which you touch on. &lt;/blockquote&gt;

I couldn&#039;t agree more. I got a boatload of probs when I first started using Zend and the Actionstack. You touched on many of those issues. Just clarifies my thoughts on things.....</description>
		<content:encoded><![CDATA[<p>Kieran said:<br />
<blockquote>Well said. When I started out with ZF I encountered the Actionstack, and a whole load of problems – many of which you touch on. </p></blockquote>
<p>I couldn&#8217;t agree more. I got a boatload of probs when I first started using Zend and the Actionstack. You touched on many of those issues. Just clarifies my thoughts on things&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dimitri</title>
		<link>http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/comment-page-1/#comment-954</link>
		<dc:creator>Dimitri</dc:creator>
		<pubDate>Mon, 15 Aug 2011 04:13:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.rmauger.co.uk/?p=45#comment-954</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-180&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-180&quot; rel=&quot;nofollow&quot;&gt;Actionstack is not evil&lt;/a&gt; :&lt;/strong&gt;
          Hello,
Actively developing with zf you can’t avoid hearing this over and over again, people compalining about the actionstack. I understand that you CAN make partials and views that render and fetch different stuff from the models. However, to create trully modular components, actionstack is a logical way to go (if actionstack really is such a bottleneck for performance maybe it should be made lighter). 
I have created an architecture which has dynamic modules that belong to some zone in a layout. The actionstack is used to make all the modules render themselves with their indexaction. For this reason I could just take that module and only use it solo because in indexaction it only echoes it’s own content. If you are using view scripts to also display actions of several modules in your page it is not really modular. I don’t know if you understand what I’m saying and I do get that actionstack gives overhead but it is still the thing that makes my modules the most logical I can have them. 
One thing though, I have never found the need for the action view helper and can’t really see a real use case for that one  
Cheers
         &lt;/blockquote&gt;

Hello My Friend,
Can you tell me how did you do that?
How to echoes layouts-&gt;widgetized with the calling name of a nameAction?</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-180"><p>
<strong><a href="#comment-180" rel="nofollow">Actionstack is not evil</a> :</strong><br />
          Hello,<br />
Actively developing with zf you can’t avoid hearing this over and over again, people compalining about the actionstack. I understand that you CAN make partials and views that render and fetch different stuff from the models. However, to create trully modular components, actionstack is a logical way to go (if actionstack really is such a bottleneck for performance maybe it should be made lighter).<br />
I have created an architecture which has dynamic modules that belong to some zone in a layout. The actionstack is used to make all the modules render themselves with their indexaction. For this reason I could just take that module and only use it solo because in indexaction it only echoes it’s own content. If you are using view scripts to also display actions of several modules in your page it is not really modular. I don’t know if you understand what I’m saying and I do get that actionstack gives overhead but it is still the thing that makes my modules the most logical I can have them.<br />
One thing though, I have never found the need for the action view helper and can’t really see a real use case for that one<br />
Cheers
         </p></blockquote>
<p>Hello My Friend,<br />
Can you tell me how did you do that?<br />
How to echoes layouts-&gt;widgetized with the calling name of a nameAction?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cris</title>
		<link>http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/comment-page-1/#comment-915</link>
		<dc:creator>Cris</dc:creator>
		<pubDate>Wed, 23 Feb 2011 22:55:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.rmauger.co.uk/?p=45#comment-915</guid>
		<description>Consider the following:
I am using different layout()-&gt;blockX to render independent content besides the main layout()-&gt;content.
One of those independent blocks has, for the sake of keeping it simple, 15 lines of code.

With actionstack I can use ONE action dedicated to that block which handles all the code needed to render its view.

Now how would you go about using something else then actionstack to render that block along with the main content without having to write those 15 lines of code (that are only written once! when using actionstack) in EVERY action or controller init where I want to render said block?
Also consider that the block in question is like a switch, in 50% of pages i need viewX for the same block and in the remaining viewY (just to make a point here).

Until recently I used render, renderScript and the partial view helper and from my 16 month experience with zend none are as elegant as actionstack.
Just:
actionstack(nav,nav)
actionstack(filters,filters)
actionstack(cart,cart)
actionstack(search,search)

and all thats left is the main content. Can&#039;t say I&#039;ve noticed any performance changes.</description>
		<content:encoded><![CDATA[<p>Consider the following:<br />
I am using different layout()-&gt;blockX to render independent content besides the main layout()-&gt;content.<br />
One of those independent blocks has, for the sake of keeping it simple, 15 lines of code.</p>
<p>With actionstack I can use ONE action dedicated to that block which handles all the code needed to render its view.</p>
<p>Now how would you go about using something else then actionstack to render that block along with the main content without having to write those 15 lines of code (that are only written once! when using actionstack) in EVERY action or controller init where I want to render said block?<br />
Also consider that the block in question is like a switch, in 50% of pages i need viewX for the same block and in the remaining viewY (just to make a point here).</p>
<p>Until recently I used render, renderScript and the partial view helper and from my 16 month experience with zend none are as elegant as actionstack.<br />
Just:<br />
actionstack(nav,nav)<br />
actionstack(filters,filters)<br />
actionstack(cart,cart)<br />
actionstack(search,search)</p>
<p>and all thats left is the main content. Can&#8217;t say I&#8217;ve noticed any performance changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rvdavid</title>
		<link>http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/comment-page-1/#comment-882</link>
		<dc:creator>rvdavid</dc:creator>
		<pubDate>Fri, 28 Jan 2011 17:09:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.rmauger.co.uk/?p=45#comment-882</guid>
		<description>@sims Actions are most certainly _not_ evil. The topic of this is an ActionHelper component called &quot;ActionStack&quot; which is documented in the manual; here&#039;s the link: 

http://framework.zend.com/manual/1.11/en/zend.controller.actionhelpers.html

HTH</description>
		<content:encoded><![CDATA[<p>@sims Actions are most certainly _not_ evil. The topic of this is an ActionHelper component called &#8220;ActionStack&#8221; which is documented in the manual; here&#8217;s the link: </p>
<p><a href="http://framework.zend.com/manual/1.11/en/zend.controller.actionhelpers.html" rel="nofollow">http://framework.zend.com/manual/1.11/en/zend.controller.actionhelpers.html</a></p>
<p>HTH</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sims</title>
		<link>http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/comment-page-1/#comment-865</link>
		<dc:creator>sims</dc:creator>
		<pubDate>Sun, 16 Jan 2011 07:46:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.rmauger.co.uk/?p=45#comment-865</guid>
		<description>I just want to make sure the point of this post is not &quot;actions&quot; are evil. I was a bit confused by &quot;Actionstack&quot; I&#039;ve never used the action view helper because I thought it was a pretty lame band aid. What is referred to by &quot;actionstack&quot;? Links to docs would be nice.</description>
		<content:encoded><![CDATA[<p>I just want to make sure the point of this post is not &#8220;actions&#8221; are evil. I was a bit confused by &#8220;Actionstack&#8221; I&#8217;ve never used the action view helper because I thought it was a pretty lame band aid. What is referred to by &#8220;actionstack&#8221;? Links to docs would be nice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ethan Fremen</title>
		<link>http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/comment-page-1/#comment-763</link>
		<dc:creator>Ethan Fremen</dc:creator>
		<pubDate>Thu, 16 Dec 2010 16:30:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.rmauger.co.uk/?p=45#comment-763</guid>
		<description>So ... the primary reason I&#039;d gone with the action stack is it allows components of the page to be provided via json (where they will be a full request) or included in the page on load, &quot;without changes&quot;.

What it seems *would* make sense is for there to be some way to know you are in a &quot;sub request&quot; and thus bail out of a lot of the initialization that happens.

~ehtan</description>
		<content:encoded><![CDATA[<p>So &#8230; the primary reason I&#8217;d gone with the action stack is it allows components of the page to be provided via json (where they will be a full request) or included in the page on load, &#8220;without changes&#8221;.</p>
<p>What it seems *would* make sense is for there to be some way to know you are in a &#8220;sub request&#8221; and thus bail out of a lot of the initialization that happens.</p>
<p>~ehtan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Otton &#183; Six Links, Twice</title>
		<link>http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/comment-page-1/#comment-749</link>
		<dc:creator>David Otton &#183; Six Links, Twice</dc:creator>
		<pubDate>Mon, 13 Dec 2010 00:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.rmauger.co.uk/?p=45#comment-749</guid>
		<description>[...] Action View Helper is Evil [...]</description>
		<content:encoded><![CDATA[<p>[...] Action View Helper is Evil [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max&#8217; Lesestoff zum Wochenende &#8211; 49/2010 &#124; PHP hates me - Der PHP Blog</title>
		<link>http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/comment-page-1/#comment-744</link>
		<dc:creator>Max&#8217; Lesestoff zum Wochenende &#8211; 49/2010 &#124; PHP hates me - Der PHP Blog</dc:creator>
		<pubDate>Sat, 11 Dec 2010 05:59:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.rmauger.co.uk/?p=45#comment-744</guid>
		<description>[...] &#8211; Stack Overflow Massive Linkliste zu Webseite mit kostenlosen Bücher zum Programmieren   Why the Zend Framework Actionstack is Evil « Ryan’s Blog In welchen Fällen der Actionstack von Zend_Controller böse sein könnte &#8230;.               [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8211; Stack Overflow Massive Linkliste zu Webseite mit kostenlosen Bücher zum Programmieren   Why the Zend Framework Actionstack is Evil « Ryan’s Blog In welchen Fällen der Actionstack von Zend_Controller böse sein könnte &#8230;.               [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/comment-page-1/#comment-685</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 23 Nov 2010 17:14:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.rmauger.co.uk/?p=45#comment-685</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-165&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-165&quot; rel=&quot;nofollow&quot;&gt;Cristian&lt;/a&gt; :&lt;/strong&gt;
          I am investigating also some ways to avoid using ActionStack for widgetized content to see what effective options we have. I am trying to put some very simple sample cases.
1. Using view-&gt;render
Into action controller prepare data for those areas and set it to view: $this-&gt;view-&gt;data = LoadDataFromModel.
Then on view we are simply making a $this-&gt;render(‘widgetA.phtml’), and widgetA.phtml makes use of data supplied to view;
This is probably the fastest into processing terms, no helper used.
2. Using view-&gt;render with layout &amp; response segments
Let’s suppose on Layout we have two zones, zone1, and zone2 with witgetized content (data from some diff sources).
    layout()-&gt;zone1?&gt;
    layout()-&gt;content?&gt;
    layout()-&gt;zone2?&gt;
Into action controller prepare data for those areas and set it to view $this-&gt;view-&gt;data = $data_from_model.
Then:
        $response = $this-&gt;getResponse();
        $response-&gt;insert(‘zone1′, $this-&gt;view-&gt;render(‘widget1.phtml’));
        $response-&gt;insert(‘zone2′, $this-&gt;view-&gt;render(‘widget2.phtml’));
Advantage of this methos would be the fact that is adapted to use of layouts.
3. Using view helpers without layout – fixed widgets
This is similar as 1, just that:
- Instead of $this-&gt;render(‘widgetA.phtml’) we are calling helper: $this-&gt;widgetA(….)
- Data is loaded by helper, not on action
I said fixed widgets because in such case the widget call is hardcoded into a specific template, so we won’t really have the option to use diff widgets on same position depending on case
3. Using view helpers without layout – dynamic widgets
This is similar with3, just that:
- Instead of calling $this-&gt;widgetA(….) we are calling $this-&gt;widget(….)
- $this-&gt;widget(….) dynamically select the proper widget to call and it returns his return result
5. Using view helpers with layouts
This is similar as 2, just that on action we have something like that
        $response = $this-&gt;getResponse();
        $response-&gt;insert(‘zone1′, $this-&gt;view-&gt;widgetA());
        $response-&gt;insert(‘zone2′, $this-&gt;view-&gt;widgetB());
And of course, we can automatically select the widget to be called.
Might be other ways, i just tried to make a list to see choices…
         &lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-165"><p>
<strong><a href="#comment-165" rel="nofollow">Cristian</a> :</strong><br />
          I am investigating also some ways to avoid using ActionStack for widgetized content to see what effective options we have. I am trying to put some very simple sample cases.<br />
1. Using view-&gt;render<br />
Into action controller prepare data for those areas and set it to view: $this-&gt;view-&gt;data = LoadDataFromModel.<br />
Then on view we are simply making a $this-&gt;render(‘widgetA.phtml’), and widgetA.phtml makes use of data supplied to view;<br />
This is probably the fastest into processing terms, no helper used.<br />
2. Using view-&gt;render with layout &amp; response segments<br />
Let’s suppose on Layout we have two zones, zone1, and zone2 with witgetized content (data from some diff sources).<br />
    layout()-&gt;zone1?&gt;<br />
    layout()-&gt;content?&gt;<br />
    layout()-&gt;zone2?&gt;<br />
Into action controller prepare data for those areas and set it to view $this-&gt;view-&gt;data = $data_from_model.<br />
Then:<br />
        $response = $this-&gt;getResponse();<br />
        $response-&gt;insert(‘zone1′, $this-&gt;view-&gt;render(‘widget1.phtml’));<br />
        $response-&gt;insert(‘zone2′, $this-&gt;view-&gt;render(‘widget2.phtml’));<br />
Advantage of this methos would be the fact that is adapted to use of layouts.<br />
3. Using view helpers without layout – fixed widgets<br />
This is similar as 1, just that:<br />
- Instead of $this-&gt;render(‘widgetA.phtml’) we are calling helper: $this-&gt;widgetA(….)<br />
- Data is loaded by helper, not on action<br />
I said fixed widgets because in such case the widget call is hardcoded into a specific template, so we won’t really have the option to use diff widgets on same position depending on case<br />
3. Using view helpers without layout – dynamic widgets<br />
This is similar with3, just that:<br />
- Instead of calling $this-&gt;widgetA(….) we are calling $this-&gt;widget(….)<br />
- $this-&gt;widget(….) dynamically select the proper widget to call and it returns his return result<br />
5. Using view helpers with layouts<br />
This is similar as 2, just that on action we have something like that<br />
        $response = $this-&gt;getResponse();<br />
        $response-&gt;insert(‘zone1′, $this-&gt;view-&gt;widgetA());<br />
        $response-&gt;insert(‘zone2′, $this-&gt;view-&gt;widgetB());<br />
And of course, we can automatically select the widget to be called.<br />
Might be other ways, i just tried to make a list to see choices…
         </p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Noble</title>
		<link>http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/comment-page-1/#comment-674</link>
		<dc:creator>Jake Noble</dc:creator>
		<pubDate>Sat, 21 Aug 2010 14:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.rmauger.co.uk/?p=45#comment-674</guid>
		<description>Great article. Negative, but well explained and completely justified!</description>
		<content:encoded><![CDATA[<p>Great article. Negative, but well explained and completely justified!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

