<?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>Thu, 11 Mar 2010 16:09:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<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>
	<item>
		<title>By: Guy</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-4322</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Fri, 27 Jun 2008 16:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-4322</guid>
		<description>Hi pcdinh,
You&#039;re arguments sound very interesting. It seems to me that you&#039;re talking on a much more general  way than me. In most MVC web-frameworks the Model refers to the database, as this is the common used persistent data storage. You&#039;re right about the distinction between Push and Pull, it relates to the data. In push the data gets pushed by the Controller to the View, in Pull the data gets pulled by the view from the Controller. This is essentially what I said in the post. The whole thing with the user is to show how thing integrate in a more simple scenario (the user makes an action and how the system reacts).</description>
		<content:encoded><![CDATA[<p>Hi pcdinh,<br />
You&#8217;re arguments sound very interesting. It seems to me that you&#8217;re talking on a much more general  way than me. In most MVC web-frameworks the Model refers to the database, as this is the common used persistent data storage. You&#8217;re right about the distinction between Push and Pull, it relates to the data. In push the data gets pushed by the Controller to the View, in Pull the data gets pulled by the view from the Controller. This is essentially what I said in the post. The whole thing with the user is to show how thing integrate in a more simple scenario (the user makes an action and how the system reacts).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pcdinh</title>
		<link>http://www.guyrutenberg.com/2008/04/26/pull-vs-push-mvc-architecture/comment-page-1/#comment-4312</link>
		<dc:creator>pcdinh</dc:creator>
		<pubDate>Thu, 26 Jun 2008 14:50:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=30#comment-4312</guid>
		<description>I believe that you are wrong on the relationship between Views and Controller to determine if an architecture is kind of Pull MVC or Push MVC. Pull or Push is about data, not about event. In fact, it is about the relation between View and Model.

Those documents below will help clarify this confusion

http://java.sun.com/blueprints/patterns/MVC-detailed.html
(The view renders the contents of a model. It accesses enterprise data through the model and specifies how that data should be presented. It is the view&#039;s responsibility to maintain consistency in its presentation when the model changes. This can be achieved by using a push model, where the view registers itself with the model for change notifications, or a pull model, where the view is responsible for calling the model when it needs to retrieve the most current data. )

http://www.theserverside.com/patterns/thread.tss?thread_id=22143 Clarification on MVC Pull and MVC Push

Also, you said: &quot;The Model is responsible for database access and executing queries&quot; Please feel free to disagree with me but I am afraid that it is a bit misleading. What you said is about persistent layer, which sometimes is considered part of Model. &quot;The model represents enterprise data and the business rules that govern access to and updates of this data. Often the model serves as a software approximation to a real-world process, so simple real-world modeling techniques apply when defining the model.&quot; (Sun Microsystems documentation)</description>
		<content:encoded><![CDATA[<p>I believe that you are wrong on the relationship between Views and Controller to determine if an architecture is kind of Pull MVC or Push MVC. Pull or Push is about data, not about event. In fact, it is about the relation between View and Model.</p>
<p>Those documents below will help clarify this confusion</p>
<p><a href="http://java.sun.com/blueprints/patterns/MVC-detailed.html" rel="nofollow">http://java.sun.com/blueprints/patterns/MVC-detailed.html</a><br />
(The view renders the contents of a model. It accesses enterprise data through the model and specifies how that data should be presented. It is the view&#8217;s responsibility to maintain consistency in its presentation when the model changes. This can be achieved by using a push model, where the view registers itself with the model for change notifications, or a pull model, where the view is responsible for calling the model when it needs to retrieve the most current data. )</p>
<p><a href="http://www.theserverside.com/patterns/thread.tss?thread_id=22143" rel="nofollow">http://www.theserverside.com/patterns/thread.tss?thread_id=22143</a> Clarification on MVC Pull and MVC Push</p>
<p>Also, you said: &#8220;The Model is responsible for database access and executing queries&#8221; Please feel free to disagree with me but I am afraid that it is a bit misleading. What you said is about persistent layer, which sometimes is considered part of Model. &#8220;The model represents enterprise data and the business rules that govern access to and updates of this data. Often the model serves as a software approximation to a real-world process, so simple real-world modeling techniques apply when defining the model.&#8221; (Sun Microsystems documentation)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

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