<?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: MVC (Model-View-Controller) introduction simplified</title>
	<atom:link href="http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/</link>
	<description></description>
	<lastBuildDate>Fri, 23 Sep 2011 18:33:35 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Be careful when using Singleton Pattern &#171; hawaiiantime</title>
		<link>http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/comment-page-1/#comment-7480</link>
		<dc:creator>Be careful when using Singleton Pattern &#171; hawaiiantime</dc:creator>
		<pubDate>Wed, 16 Feb 2011 17:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://thaylin.info/blog/?p=270#comment-7480</guid>
		<description>[...] Thaylin shows a good example how to avoid this problem. Thus, instantiate Model class(not Singleton) and pass it to a View instance. Quoted what he saids about implementing Model as Singleton. [...]</description>
		<content:encoded><![CDATA[<p>[...] Thaylin shows a good example how to avoid this problem. Thus, instantiate Model class(not Singleton) and pass it to a View instance. Quoted what he saids about implementing Model as Singleton. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giulian Drimba</title>
		<link>http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/comment-page-1/#comment-3573</link>
		<dc:creator>Giulian Drimba</dc:creator>
		<pubDate>Sat, 06 Mar 2010 00:07:03 +0000</pubDate>
		<guid isPermaLink="false">http://thaylin.info/blog/?p=270#comment-3573</guid>
		<description>Very nice tutorial, thank&#039;s for this!!!</description>
		<content:encoded><![CDATA[<p>Very nice tutorial, thank&#8217;s for this!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giulian Drimba</title>
		<link>http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/comment-page-1/#comment-3555</link>
		<dc:creator>Giulian Drimba</dc:creator>
		<pubDate>Fri, 05 Mar 2010 01:21:06 +0000</pubDate>
		<guid isPermaLink="false">http://thaylin.info/blog/?p=270#comment-3555</guid>
		<description>The example doesnt work for me :(</description>
		<content:encoded><![CDATA[<p>The example doesnt work for me <img src='http://www.thaylin.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thaylin</title>
		<link>http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/comment-page-1/#comment-2828</link>
		<dc:creator>Thaylin</dc:creator>
		<pubDate>Tue, 02 Feb 2010 14:36:36 +0000</pubDate>
		<guid isPermaLink="false">http://thaylin.info/blog/?p=270#comment-2828</guid>
		<description>Good question Byron.
The View in this example sits around and only contains the graphical elements. We don&#039;t want to couple the View with the Model too tightly which is why it uses the Controller to do all the functionality and changes. The View will just accept input from the user and dispatch an event which is then handled by the Controller to update the Model or View if necessary. The only thing I do here with regards to the Model pairing with the View is passing the Model into it&#039;s constructor so we can let the Controller know that there&#039;s a Model associated with it. 
Sometimes there may be reasons for using an observer to take over certain responsibilities of the Controller but based on my schooling and a lot of research I did to create the most concise and logical tutorial I could, this is what seems to be the best methodology. Though, there is never really a wrong way to do things and certain projects would require certain levels of changes to occur.
Remember this is a pattern, which is based on many people running across this type of interaction between objects throughout the years. As such, it does not need to be strictly followed but merely understood that this could come up and this is a good way to handle that interaction. But never complicate things too much if you don&#039;t need to. By adding an observer where you may not need it, you&#039;ve just added another class in which you would have to look when errors occur, complicating your project to the nth degree depending on how much of that you do.
My mantra in programming is &quot;The less typing the better&quot;. :)</description>
		<content:encoded><![CDATA[<p>Good question Byron.<br />
The View in this example sits around and only contains the graphical elements. We don&#8217;t want to couple the View with the Model too tightly which is why it uses the Controller to do all the functionality and changes. The View will just accept input from the user and dispatch an event which is then handled by the Controller to update the Model or View if necessary. The only thing I do here with regards to the Model pairing with the View is passing the Model into it&#8217;s constructor so we can let the Controller know that there&#8217;s a Model associated with it.<br />
Sometimes there may be reasons for using an observer to take over certain responsibilities of the Controller but based on my schooling and a lot of research I did to create the most concise and logical tutorial I could, this is what seems to be the best methodology. Though, there is never really a wrong way to do things and certain projects would require certain levels of changes to occur.<br />
Remember this is a pattern, which is based on many people running across this type of interaction between objects throughout the years. As such, it does not need to be strictly followed but merely understood that this could come up and this is a good way to handle that interaction. But never complicate things too much if you don&#8217;t need to. By adding an observer where you may not need it, you&#8217;ve just added another class in which you would have to look when errors occur, complicating your project to the nth degree depending on how much of that you do.<br />
My mantra in programming is &#8220;The less typing the better&#8221;. <img src='http://www.thaylin.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: byron</title>
		<link>http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/comment-page-1/#comment-2818</link>
		<dc:creator>byron</dc:creator>
		<pubDate>Tue, 02 Feb 2010 05:34:22 +0000</pubDate>
		<guid isPermaLink="false">http://thaylin.info/blog/?p=270#comment-2818</guid>
		<description>According to the figure at the top of the MVC Wiki page, the View is an observer of the Model. Also, according to the figure, the View and the Model have a direct association such that the View can send messages to the Model.

When I look at your code, I don&#039;t see examples of these associations.  In addition, it looks like you have the Controller being an observer of the Model, which is an association which doesn&#039;t appear on the figure at the top of the MVC Wiki page.

I am misinterpreting the MVC figure and/or your code?

Thanks.</description>
		<content:encoded><![CDATA[<p>According to the figure at the top of the MVC Wiki page, the View is an observer of the Model. Also, according to the figure, the View and the Model have a direct association such that the View can send messages to the Model.</p>
<p>When I look at your code, I don&#8217;t see examples of these associations.  In addition, it looks like you have the Controller being an observer of the Model, which is an association which doesn&#8217;t appear on the figure at the top of the MVC Wiki page.</p>
<p>I am misinterpreting the MVC figure and/or your code?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cor van Dooren</title>
		<link>http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/comment-page-1/#comment-2567</link>
		<dc:creator>Cor van Dooren</dc:creator>
		<pubDate>Wed, 20 Jan 2010 20:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://thaylin.info/blog/?p=270#comment-2567</guid>
		<description>Thaylin,

Thanks for the clear explaination!
I would love to see some more complex MVC structure.

Regards</description>
		<content:encoded><![CDATA[<p>Thaylin,</p>
<p>Thanks for the clear explaination!<br />
I would love to see some more complex MVC structure.</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thaylin</title>
		<link>http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/comment-page-1/#comment-2537</link>
		<dc:creator>Thaylin</dc:creator>
		<pubDate>Tue, 19 Jan 2010 18:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://thaylin.info/blog/?p=270#comment-2537</guid>
		<description>The Thaylin approach? I love it!
:)
Any other questions feel free to ask.</description>
		<content:encoded><![CDATA[<p>The Thaylin approach? I love it! <img src='http://www.thaylin.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Any other questions feel free to ask.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barney</title>
		<link>http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/comment-page-1/#comment-2536</link>
		<dc:creator>Barney</dc:creator>
		<pubDate>Tue, 19 Jan 2010 18:36:27 +0000</pubDate>
		<guid isPermaLink="false">http://thaylin.info/blog/?p=270#comment-2536</guid>
		<description>Hi. 

Thanks alot for putting this up. I&#039;m new to MVC and was struggling to find a way to get input from textfields (user presses button to validate input) into the controller. I was contemplating putting a reference to the view into the controller somehow, as this seemed the only solution, but no-one else seems to mention that this is ever necessary. Perhaps it&#039;s because it&#039;s often illustrated with things like keyboard events. Anyway, you sound like you know what you&#039;re talking about so I&#039;ve gone with the Thaylin approach!</description>
		<content:encoded><![CDATA[<p>Hi. </p>
<p>Thanks alot for putting this up. I&#8217;m new to MVC and was struggling to find a way to get input from textfields (user presses button to validate input) into the controller. I was contemplating putting a reference to the view into the controller somehow, as this seemed the only solution, but no-one else seems to mention that this is ever necessary. Perhaps it&#8217;s because it&#8217;s often illustrated with things like keyboard events. Anyway, you sound like you know what you&#8217;re talking about so I&#8217;ve gone with the Thaylin approach!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SuperDuperNubie</title>
		<link>http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/comment-page-1/#comment-1930</link>
		<dc:creator>SuperDuperNubie</dc:creator>
		<pubDate>Fri, 18 Dec 2009 22:15:36 +0000</pubDate>
		<guid isPermaLink="false">http://thaylin.info/blog/?p=270#comment-1930</guid>
		<description>Just wanted to say, GREAT JOB!! Finally a simple walkthough of MVC.  I have just started really getting into true OOP and have no prior proframing training of any kind other than being a self tought timeline action scripter. Although i am using the MVC pattern to a certain extent.  It tends to get messy and this tutorial has helped clarify things alot.</description>
		<content:encoded><![CDATA[<p>Just wanted to say, GREAT JOB!! Finally a simple walkthough of MVC.  I have just started really getting into true OOP and have no prior proframing training of any kind other than being a self tought timeline action scripter. Although i am using the MVC pattern to a certain extent.  It tends to get messy and this tutorial has helped clarify things alot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thaylin</title>
		<link>http://www.thaylin.com/blog/2009/11/04/mvc-model-view-controller-introduction-simplified/comment-page-1/#comment-1533</link>
		<dc:creator>Thaylin</dc:creator>
		<pubDate>Tue, 10 Nov 2009 19:18:25 +0000</pubDate>
		<guid isPermaLink="false">http://thaylin.info/blog/?p=270#comment-1533</guid>
		<description>@ Ali Tan Ucer
To create the model as a singleton would not really be ideal since that would break the loose coupling that comes with the mvc pattern. I&#039;m not saying in some circumstances it can&#039;t be done but ideally the model should be passed via the constructor to keep things easy for unit testing and what not. 

Again though, this really depends on your preference and the scope of the project. A simpler project may not have a need to be so loosely coupled, but it&#039;s always good to look ahead and keep things ready for any possible changes to the project that could happen. It all depends on if you are willing to take the risk and if you understand that you may, in the future, need to decouple those things.

-Thaylin</description>
		<content:encoded><![CDATA[<p>@ Ali Tan Ucer<br />
To create the model as a singleton would not really be ideal since that would break the loose coupling that comes with the mvc pattern. I&#8217;m not saying in some circumstances it can&#8217;t be done but ideally the model should be passed via the constructor to keep things easy for unit testing and what not. </p>
<p>Again though, this really depends on your preference and the scope of the project. A simpler project may not have a need to be so loosely coupled, but it&#8217;s always good to look ahead and keep things ready for any possible changes to the project that could happen. It all depends on if you are willing to take the risk and if you understand that you may, in the future, need to decouple those things.</p>
<p>-Thaylin</p>
]]></content:encoded>
	</item>
</channel>
</rss>

