<?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: Choosing a UI Pattern (MVC, MVP, and ASP.Net MVC)</title>
	<atom:link href="http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/</link>
	<description>Microsoft/.Net/SharePoint thoughts -</description>
	<lastBuildDate>Tue, 31 Jan 2012 14:43:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Vishwanath Nayak</title>
		<link>http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/comment-page-1/#comment-1531</link>
		<dc:creator>Vishwanath Nayak</dc:creator>
		<pubDate>Wed, 07 Sep 2011 09:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://greggalipeau.wordpress.com/?p=43#comment-1531</guid>
		<description>Hello Greg, It’s a very good article on choosing MVP over MVC patterns and highlighted the limitations of ASP.NET MVC framework. I would appreciate if you can publish more information on supervising controller and passive view patterns and decision to choose them.</description>
		<content:encoded><![CDATA[<p>Hello Greg, It’s a very good article on choosing MVP over MVC patterns and highlighted the limitations of ASP.NET MVC framework. I would appreciate if you can publish more information on supervising controller and passive view patterns and decision to choose them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Douglas &#187; Blog Archive &#187; System Architecture (Basics) - Resources</title>
		<link>http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/comment-page-1/#comment-124</link>
		<dc:creator>Andy Douglas &#187; Blog Archive &#187; System Architecture (Basics) - Resources</dc:creator>
		<pubDate>Tue, 08 Sep 2009 15:09:13 +0000</pubDate>
		<guid isPermaLink="false">http://greggalipeau.wordpress.com/?p=43#comment-124</guid>
		<description>[...] (.Net) Choosing a UI Pattern (MVC, MVP, and ASP.Net MVC) [...]</description>
		<content:encoded><![CDATA[<p>[...] (.Net) Choosing a UI Pattern (MVC, MVP, and ASP.Net MVC) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: digitalMoto.net &#187; Are you an astronaut?</title>
		<link>http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/comment-page-1/#comment-123</link>
		<dc:creator>digitalMoto.net &#187; Are you an astronaut?</dc:creator>
		<pubDate>Wed, 22 Apr 2009 00:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://greggalipeau.wordpress.com/?p=43#comment-123</guid>
		<description>[...] Choosing a UI Pattern (MVC, MVP, and ASP.Net MVC) [...]</description>
		<content:encoded><![CDATA[<p>[...] Choosing a UI Pattern (MVC, MVP, and ASP.Net MVC) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lei Zhong</title>
		<link>http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/comment-page-1/#comment-122</link>
		<dc:creator>Lei Zhong</dc:creator>
		<pubDate>Tue, 02 Dec 2008 04:58:34 +0000</pubDate>
		<guid isPermaLink="false">http://greggalipeau.wordpress.com/?p=43#comment-122</guid>
		<description>Hey Greg, I can learn a lot from opinions like yours which had to come from real world experience. Keep up the blogging - I know you are super busy, but this is very helpful for fellow developers.</description>
		<content:encoded><![CDATA[<p>Hey Greg, I can learn a lot from opinions like yours which had to come from real world experience. Keep up the blogging &#8211; I know you are super busy, but this is very helpful for fellow developers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Zhukov</title>
		<link>http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/comment-page-1/#comment-121</link>
		<dc:creator>Oleg Zhukov</dc:creator>
		<pubDate>Thu, 30 Oct 2008 12:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://greggalipeau.wordpress.com/?p=43#comment-121</guid>
		<description>Great overview!

You might be interested in a Model View Presenter framework implementation for .NET - http://www.mvcsharp.org .

Regards,
--
Oleg Zhukov</description>
		<content:encoded><![CDATA[<p>Great overview!</p>
<p>You might be interested in a Model View Presenter framework implementation for .NET &#8211; <a href="http://www.mvcsharp.org" rel="nofollow">http://www.mvcsharp.org</a> .</p>
<p>Regards,<br />
&#8211;<br />
Oleg Zhukov</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: To (ASP.NET)MVC or not to MVC (or, ASP.NET MVC Hyperlink Acupuncture) &#124; The Freak Parade</title>
		<link>http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/comment-page-1/#comment-120</link>
		<dc:creator>To (ASP.NET)MVC or not to MVC (or, ASP.NET MVC Hyperlink Acupuncture) &#124; The Freak Parade</dc:creator>
		<pubDate>Thu, 11 Sep 2008 20:27:35 +0000</pubDate>
		<guid isPermaLink="false">http://greggalipeau.wordpress.com/?p=43#comment-120</guid>
		<description>[...] may also like to read this article about choosing a web framework for [...]</description>
		<content:encoded><![CDATA[<p>[...] may also like to read this article about choosing a web framework for [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Lian</title>
		<link>http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/comment-page-1/#comment-119</link>
		<dc:creator>Steve Lian</dc:creator>
		<pubDate>Thu, 07 Aug 2008 15:58:08 +0000</pubDate>
		<guid isPermaLink="false">http://greggalipeau.wordpress.com/?p=43#comment-119</guid>
		<description>Hi Greg,

Thanks for the explanations, it&#039;s very clear and i got the whole picture of the design now. Again, thanks for the help,  :D

Steve.</description>
		<content:encoded><![CDATA[<p>Hi Greg,</p>
<p>Thanks for the explanations, it&#8217;s very clear and i got the whole picture of the design now. Again, thanks for the help,  <img src='http://www.greggalipeau.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Steve.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Galipeau</title>
		<link>http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/comment-page-1/#comment-118</link>
		<dc:creator>Greg Galipeau</dc:creator>
		<pubDate>Thu, 07 Aug 2008 15:22:56 +0000</pubDate>
		<guid isPermaLink="false">http://greggalipeau.wordpress.com/?p=43#comment-118</guid>
		<description>Hey Steve,
I am not sure this question boils down to an AJAX.Net or regular webpage question. The concept of using AJAX.Net doesn&#039;t really affect the UI patterns described. So, I will try to answer the question from a general &quot;what is happening&quot; point of view. However, it will be really hard to answer this in a comment - there are whole WhitePapers on the subject of how to implement these patterns correctly. But, I will give it a try :)

We will stick to MVC for this question because it is harder to explain for MVP. Basically, any logic that you would normally put in your code behind file would be put into a controller. Then the controller could call out to your businsses layer. This way, UI logic is on the controller and Business Logic is in your BLL.

An example of this is validation. Lets say you were doing validation on your code behind by overriding the validating methods of the code behind. In the MVC pattern that overridden validation method, in the code behind, would just be one line: Controller.Validate(). The controller will actually run that UI logic (or call out to the BLL if it is truely Business logic). Now you can also do things like implement interfaces or base classes for your controllers to force them to have methods like Validate. This way if anyone creates a new screen in your app and they use the Controller pattern, they will be forced to Validate their page. This is one small example.

Another example people can associate with is Save. Your controller has the save method and the UI just calls controller.Save(parameters) to do the actually save. Maybe your save runs some other validation at this point, in the controller, and raises an event back to the view about what to do. Or maybe your save just calls out to your BLL from the controller. The point is, everything UI related is done in the controller. And, you can inforce this with the use of interfaces and base classes.

Then, when you build testing into your application you can just instantiate controllers and call methods on the controller from your testing framework. That is the really simple answer to the question. There are lots of detailed examples on the internet (I don&#039;t know one off the top of my head though, sorry).

Basically, I like to think of these patterns as making your Views &quot;stupid&quot;. You try to make the views not do that much at all. This way, the testing framework can then work with the Controller (or Presenter for the MVP pattern) to do it&#039;s testing. I like to think of the tests in these cases as the actual View.

Now, the MVP pattern goes way more in depth than the MVC pattern, so I don&#039;t want to try explaining it in a comment. But, the basic principal of it is that the View is even an interface and the presenter knows about the Views interface. Thus, the presenter tries to do everything for the View. This makes the View &quot;really stupid&quot; :)

I know it is a complicated subject, but after using the patterns, you will never go back. I hope I did them justice in the explanation. Just remember, Ajax or not, it really doesn&#039;t matter. Because, it is all about how the &quot;Server&quot; side code interacts with the Controller or Presenter.

Greg</description>
		<content:encoded><![CDATA[<p>Hey Steve,<br />
I am not sure this question boils down to an AJAX.Net or regular webpage question. The concept of using AJAX.Net doesn&#8217;t really affect the UI patterns described. So, I will try to answer the question from a general &#8220;what is happening&#8221; point of view. However, it will be really hard to answer this in a comment &#8211; there are whole WhitePapers on the subject of how to implement these patterns correctly. But, I will give it a try <img src='http://www.greggalipeau.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>We will stick to MVC for this question because it is harder to explain for MVP. Basically, any logic that you would normally put in your code behind file would be put into a controller. Then the controller could call out to your businsses layer. This way, UI logic is on the controller and Business Logic is in your BLL.</p>
<p>An example of this is validation. Lets say you were doing validation on your code behind by overriding the validating methods of the code behind. In the MVC pattern that overridden validation method, in the code behind, would just be one line: Controller.Validate(). The controller will actually run that UI logic (or call out to the BLL if it is truely Business logic). Now you can also do things like implement interfaces or base classes for your controllers to force them to have methods like Validate. This way if anyone creates a new screen in your app and they use the Controller pattern, they will be forced to Validate their page. This is one small example.</p>
<p>Another example people can associate with is Save. Your controller has the save method and the UI just calls controller.Save(parameters) to do the actually save. Maybe your save runs some other validation at this point, in the controller, and raises an event back to the view about what to do. Or maybe your save just calls out to your BLL from the controller. The point is, everything UI related is done in the controller. And, you can inforce this with the use of interfaces and base classes.</p>
<p>Then, when you build testing into your application you can just instantiate controllers and call methods on the controller from your testing framework. That is the really simple answer to the question. There are lots of detailed examples on the internet (I don&#8217;t know one off the top of my head though, sorry).</p>
<p>Basically, I like to think of these patterns as making your Views &#8220;stupid&#8221;. You try to make the views not do that much at all. This way, the testing framework can then work with the Controller (or Presenter for the MVP pattern) to do it&#8217;s testing. I like to think of the tests in these cases as the actual View.</p>
<p>Now, the MVP pattern goes way more in depth than the MVC pattern, so I don&#8217;t want to try explaining it in a comment. But, the basic principal of it is that the View is even an interface and the presenter knows about the Views interface. Thus, the presenter tries to do everything for the View. This makes the View &#8220;really stupid&#8221; <img src='http://www.greggalipeau.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I know it is a complicated subject, but after using the patterns, you will never go back. I hope I did them justice in the explanation. Just remember, Ajax or not, it really doesn&#8217;t matter. Because, it is all about how the &#8220;Server&#8221; side code interacts with the Controller or Presenter.</p>
<p>Greg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Lian</title>
		<link>http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/comment-page-1/#comment-117</link>
		<dc:creator>Steve Lian</dc:creator>
		<pubDate>Thu, 07 Aug 2008 14:47:52 +0000</pubDate>
		<guid isPermaLink="false">http://greggalipeau.wordpress.com/?p=43#comment-117</guid>
		<description>Hi Greg,

Thanks for the quick reply. Basically, i will be using AJAX.NET toolkit with UpdatePanel in order to update each section of the page individually. In this case, how does MVC(or MVP) fit into the presentation layer of my 3-tier web application, i.e, i have developed BLL and DAL, each of these layers will be residing in separate servers?

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Greg,</p>
<p>Thanks for the quick reply. Basically, i will be using AJAX.NET toolkit with UpdatePanel in order to update each section of the page individually. In this case, how does MVC(or MVP) fit into the presentation layer of my 3-tier web application, i.e, i have developed BLL and DAL, each of these layers will be residing in separate servers?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Galipeau</title>
		<link>http://www.greggalipeau.com/2008/04/04/choosing-a-ui-pattern-mvc-mvp-and-aspnet-mvc/comment-page-1/#comment-116</link>
		<dc:creator>Greg Galipeau</dc:creator>
		<pubDate>Thu, 07 Aug 2008 12:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://greggalipeau.wordpress.com/?p=43#comment-116</guid>
		<description>Hi Steve,
Integrating AJAX can mean a lot of things. First, you have to consider which AJAX toolkit you want to use. If you are in the Microsoft world, I am guessing you want to use the AJAX.net toolkit. Second, you have to consider what parts of the toolkit you want. Most people love the UpdatePanel, but there are a lot of other parts to it.
After those decisions are made your question can be answered by thinking about what AJAX does. AJAX calls to the Server and then &quot;Callsback&quot; to the Client side (rather than &quot;Posting&quot; back). Thus, the page doesn&#039;t refresh. So, the MVC pattern works with how the Server side code interacts with the business logic. Thus, you can definetly incorporate this pattern with AJAX.
Hope this helps,
Greg</description>
		<content:encoded><![CDATA[<p>Hi Steve,<br />
Integrating AJAX can mean a lot of things. First, you have to consider which AJAX toolkit you want to use. If you are in the Microsoft world, I am guessing you want to use the AJAX.net toolkit. Second, you have to consider what parts of the toolkit you want. Most people love the UpdatePanel, but there are a lot of other parts to it.<br />
After those decisions are made your question can be answered by thinking about what AJAX does. AJAX calls to the Server and then &#8220;Callsback&#8221; to the Client side (rather than &#8220;Posting&#8221; back). Thus, the page doesn&#8217;t refresh. So, the MVC pattern works with how the Server side code interacts with the business logic. Thus, you can definetly incorporate this pattern with AJAX.<br />
Hope this helps,<br />
Greg</p>
]]></content:encoded>
	</item>
</channel>
</rss>

