<?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: Pull vs. Push MVC Architecture</title>
	<atom:link href="http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/</link>
	<description>Keeping track of what I do</description>
	<lastBuildDate>Tue, 07 Feb 2012 23:33:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Software Architectural Pattern : MVC &#8211; Push vs Pull &#171; Welcome to Abdul Malik Ikhsan&#039;s Blog</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-113283</link>
		<dc:creator>Software Architectural Pattern : MVC &#8211; Push vs Pull &#171; Welcome to Abdul Malik Ikhsan&#039;s Blog</dc:creator>
		<pubDate>Thu, 22 Sep 2011 08:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-113283</guid>
		<description>[...] :  http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/  http://symfony.com/doc/2.0/book/from_flat_php_to_symfony2.html  [...]</description>
		<content:encoded><![CDATA[<p>[...] :  <a href="http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/" rel="nofollow">http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/</a>  <a href="http://symfony.com/doc/2.0/book/from_flat_php_to_symfony2.html" rel="nofollow">http://symfony.com/doc/2.0/book/from_flat_php_to_symfony2.html</a>  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rasmus Schultz</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-95835</link>
		<dc:creator>Rasmus Schultz</dc:creator>
		<pubDate>Thu, 04 Aug 2011 12:15:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-95835</guid>
		<description>The Yii framework for PHP has something called Widgets:

http://www.yiiframework.com/doc/api/1.1/CWidget

These are essentially controllers with just one action, and although constructing them and configuring them ahead of time (passing them through the view-dictionary), you can also freely construct and run these from within the view.

Yii provides widgets for things like breadcrumbs, paging and menus. Would you consider those good condidates for &quot;pull&quot;?

Personally, I have always used &quot;pull&quot; for certain things - although in the strictest terms, Tom Anderson is correct in his comment above, and for that matter, I know some people who would claim that &quot;pull&quot; is not MVC at all, because you&#039;re branching out of the view back into a controller, there is no longer any strict separation of the two. I still think it has legitimate uses for certain things though - especially when you don&#039;t care how the data gets there, as long as it gets there.</description>
		<content:encoded><![CDATA[<p>The Yii framework for PHP has something called Widgets:</p>
<p><a href="http://www.yiiframework.com/doc/api/1.1/CWidget" rel="nofollow">http://www.yiiframework.com/doc/api/1.1/CWidget</a></p>
<p>These are essentially controllers with just one action, and although constructing them and configuring them ahead of time (passing them through the view-dictionary), you can also freely construct and run these from within the view.</p>
<p>Yii provides widgets for things like breadcrumbs, paging and menus. Would you consider those good condidates for &#8220;pull&#8221;?</p>
<p>Personally, I have always used &#8220;pull&#8221; for certain things &#8211; although in the strictest terms, Tom Anderson is correct in his comment above, and for that matter, I know some people who would claim that &#8220;pull&#8221; is not MVC at all, because you&#8217;re branching out of the view back into a controller, there is no longer any strict separation of the two. I still think it has legitimate uses for certain things though &#8211; especially when you don&#8217;t care how the data gets there, as long as it gets there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-29776</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Mon, 08 Mar 2010 18:26:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-29776</guid>
		<description>I&#039;m not familiar with the Zend Framework, but it sounds to me like a &quot;pull&quot; functionality. As the request for the sub-content is generated by the view and not the controller. It seems like it&#039;s part of a combined push-pull. &quot;Push&quot; for the main content, &quot;pull&quot; for the sidebars and etc.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not familiar with the Zend Framework, but it sounds to me like a &#8220;pull&#8221; functionality. As the request for the sub-content is generated by the view and not the controller. It seems like it&#8217;s part of a combined push-pull. &#8220;Push&#8221; for the main content, &#8220;pull&#8221; for the sidebars and etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NhanVu</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-29768</link>
		<dc:creator>NhanVu</dc:creator>
		<pubDate>Mon, 08 Mar 2010 15:12:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-29768</guid>
		<description>What about View Helpers in the Zend Framework? Do they provide a kind of &quot;pull&quot; functionality when they are used to generate a page&#039;s sub-contents such as sidebars?</description>
		<content:encoded><![CDATA[<p>What about View Helpers in the Zend Framework? Do they provide a kind of &#8220;pull&#8221; functionality when they are used to generate a page&#8217;s sub-contents such as sidebars?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Anderson</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-29107</link>
		<dc:creator>Tom Anderson</dc:creator>
		<pubDate>Sun, 21 Feb 2010 12:39:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-29107</guid>
		<description>When you allow the view/gui pull data, it becomes too smart, in my opinion. I&#039;d be of the opinion to have the controller push everything. 

Guy said that push models &quot;requires defining in advance what should be pushed&quot;. However, I&#039;m not exactly in tune with this comment, since pull models also need to know what should be pulled! 

I think the best way is to make the view dumb. If there&#039;s something that needs to be shown, let the controller do the showing. The view needs to show the controller what is needed, but it doesn&#039;t need to call the functions. In this way, the view exposes itself to the controller, and the controller pushes what needs to be pushed. 

It means that you can test your program more thoroughly.</description>
		<content:encoded><![CDATA[<p>When you allow the view/gui pull data, it becomes too smart, in my opinion. I&#8217;d be of the opinion to have the controller push everything. </p>
<p>Guy said that push models &#8220;requires defining in advance what should be pushed&#8221;. However, I&#8217;m not exactly in tune with this comment, since pull models also need to know what should be pulled! </p>
<p>I think the best way is to make the view dumb. If there&#8217;s something that needs to be shown, let the controller do the showing. The view needs to show the controller what is needed, but it doesn&#8217;t need to call the functions. In this way, the view exposes itself to the controller, and the controller pushes what needs to be pushed. </p>
<p>It means that you can test your program more thoroughly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-6089</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Fri, 12 Dec 2008 10:03:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-6089</guid>
		<description>Hi Marc,

I never used the Magento e-Commerce Platform. But the way you describe how it works, sounds to me almost ideal. It combines the use of regular push model to create the main part of the content, and allows you to &quot;pull&quot; the other parts.

Similar, but maybe to a less extent, functionality is also provided in CakePHP by use of Elements.

Frameworks that only provide strict &quot;push&quot; model, like the second one you mention, in my opinion are less robust. While when well implemented this model can have higher performance (as it&#039;s less complicated code-wise), the more configuration overhead leads to slower development. Furthermore, this model limits flexibility as it requires defining in advance what should be pushed (of course careful in-advance planning could work around it).</description>
		<content:encoded><![CDATA[<p>Hi Marc,</p>
<p>I never used the Magento e-Commerce Platform. But the way you describe how it works, sounds to me almost ideal. It combines the use of regular push model to create the main part of the content, and allows you to &#8220;pull&#8221; the other parts.</p>
<p>Similar, but maybe to a less extent, functionality is also provided in CakePHP by use of Elements.</p>
<p>Frameworks that only provide strict &#8220;push&#8221; model, like the second one you mention, in my opinion are less robust. While when well implemented this model can have higher performance (as it&#8217;s less complicated code-wise), the more configuration overhead leads to slower development. Furthermore, this model limits flexibility as it requires defining in advance what should be pushed (of course careful in-advance planning could work around it).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc Jakubowski</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-6015</link>
		<dc:creator>Marc Jakubowski</dc:creator>
		<pubDate>Mon, 08 Dec 2008 21:19:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-6015</guid>
		<description>Hi Guy,
have you looked at the Magento e-Commerce Platform (based on ZendFramework)?
I worked with it the past months and I&#039;m really impressed by it&#039;s architecture.

Magento also makes use of both described ways.
The general business logic is implemented in the controller actions that use models and push the results to the view.

But on more complex views especially when you have to conditionally load data you may use &#039;blocks&#039;, that itself have access to the needed models and get the data from them.

In my opinion this makes perfect sense. All logic that has to manipulate data in models only resides within the controller, so you should never put that part into such a block.

Furthermore I also worked with a framework that strictly enforces the &#039;push&#039; model by defining all &#039;blocks&#039;, &#039;widgets&#039;, &#039;portlets&#039; or whatever you call it, in a config file, so that all those parts will be invoked even before the templates are rendered. So the templates will never have to call methods for data retriving once the business logic is processed. This is a  much &#039;cleaner&#039; MVC approach by the cost of more configuration overhead.

Regards, Marc</description>
		<content:encoded><![CDATA[<p>Hi Guy,<br />
have you looked at the Magento e-Commerce Platform (based on ZendFramework)?<br />
I worked with it the past months and I&#8217;m really impressed by it&#8217;s architecture.</p>
<p>Magento also makes use of both described ways.<br />
The general business logic is implemented in the controller actions that use models and push the results to the view.</p>
<p>But on more complex views especially when you have to conditionally load data you may use &#8216;blocks&#8217;, that itself have access to the needed models and get the data from them.</p>
<p>In my opinion this makes perfect sense. All logic that has to manipulate data in models only resides within the controller, so you should never put that part into such a block.</p>
<p>Furthermore I also worked with a framework that strictly enforces the &#8216;push&#8217; model by defining all &#8216;blocks&#8217;, &#8216;widgets&#8217;, &#8216;portlets&#8217; or whatever you call it, in a config file, so that all those parts will be invoked even before the templates are rendered. So the templates will never have to call methods for data retriving once the business logic is processed. This is a  much &#8216;cleaner&#8217; MVC approach by the cost of more configuration overhead.</p>
<p>Regards, Marc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Food for thought: utilizing models in MVC &#124; CodeUtopia</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-5975</link>
		<dc:creator>Food for thought: utilizing models in MVC &#124; CodeUtopia</dc:creator>
		<pubDate>Sat, 06 Dec 2008 11:14:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-5975</guid>
		<description>[...] reading on the topic: J2EE View Helper pattern, J2EE Dispatcher View pattern and Pull vs Push MVC architechture on Guy Rutenberg&#8217;s blog   Share [...]</description>
		<content:encoded><![CDATA[<p>[...] reading on the topic: J2EE View Helper pattern, J2EE Dispatcher View pattern and Pull vs Push MVC architechture on Guy Rutenberg&#8217;s blog   Share [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-4756</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Wed, 30 Jul 2008 19:08:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-4756</guid>
		<description>Changed, thanks</description>
		<content:encoded><![CDATA[<p>Changed, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Er</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-4754</link>
		<dc:creator>Er</dc:creator>
		<pubDate>Wed, 30 Jul 2008 16:31:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-4754</guid>
		<description>change Mode View Controller to Model View Controller  ;)</description>
		<content:encoded><![CDATA[<p>change Mode View Controller to Model View Controller  <img src='http://www.guyrutenberg.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.274 seconds -->

