<?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: Test-Driving UIs / MVP &#8211; Part 1</title>
	<atom:link href="http://blog.coryfoy.com/2005/09/test-driving-uis-mvp-part-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.coryfoy.com/2005/09/test-driving-uis-mvp-part-1/</link>
	<description>It&#039;s all about delivering</description>
	<lastBuildDate>Wed, 08 Feb 2012 16:42:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Cory Foy</title>
		<link>http://blog.coryfoy.com/2005/09/test-driving-uis-mvp-part-1/comment-page-1/#comment-568</link>
		<dc:creator>Cory Foy</dc:creator>
		<pubDate>Sun, 11 Sep 2005 21:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cornetdesign.com/?p=342#comment-568</guid>
		<description>Well, it depends. Is that behavior part of a story? If it is, then it should be in your presentation logic.&lt;br /&gt;&lt;br /&gt;However, here&#039;s the catch. I generally advise against delving too heavily into seperating out presentation logic unless you have a need to have more than one view.&lt;br /&gt;&lt;br /&gt;But, with that being said, the trick is to delegate everything to your presentation logic from the UI. So, in your case, you might have an object like PropertyListing, which is a list of the homes the user selected. And then a PropertyListingPresenter which handles interacting between the business object and your UI code through an interface. That interface might look like:&lt;br /&gt;&lt;br /&gt;public interface IPropertyListingView&lt;br /&gt;{&lt;br /&gt;  void SetPropertyListing(PropertyListing);&lt;br /&gt;  void PropertySelected(Property);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;and your view implement it like:&lt;br /&gt;&lt;br /&gt;protected void SetPropertyListing(&lt;br /&gt;&#160;&#160;PropertyListing listings)&lt;br /&gt;{&lt;br /&gt;&#160;&#160;this.PropertyListDataGrid.DataSource = listings;&lt;br /&gt;&#160;&#160;this.PropertyListDataGrid.DataBind();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;protected void PropertyListDataGrid_ItemSelected(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;&#160;&#160;PropertySelected((Property)e);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;So, again, you are just delegating everything to the Presenter class.&lt;br /&gt;&lt;br /&gt;Does this help?</description>
		<content:encoded><![CDATA[<p>Well, it depends. Is that behavior part of a story? If it is, then it should be in your presentation logic.</p>
<p>However, here&#8217;s the catch. I generally advise against delving too heavily into seperating out presentation logic unless you have a need to have more than one view.</p>
<p>But, with that being said, the trick is to delegate everything to your presentation logic from the UI. So, in your case, you might have an object like PropertyListing, which is a list of the homes the user selected. And then a PropertyListingPresenter which handles interacting between the business object and your UI code through an interface. That interface might look like:</p>
<p>public interface IPropertyListingView<br />{<br />  void SetPropertyListing(PropertyListing);<br />  void PropertySelected(Property);<br />}</p>
<p>and your view implement it like:</p>
<p>protected void SetPropertyListing(<br />&nbsp;&nbsp;PropertyListing listings)<br />{<br />&nbsp;&nbsp;this.PropertyListDataGrid.DataSource = listings;<br />&nbsp;&nbsp;this.PropertyListDataGrid.DataBind();<br />}</p>
<p>protected void PropertyListDataGrid_ItemSelected(object sender, EventArgs e)<br />{<br />&nbsp;&nbsp;PropertySelected((Property)e);<br />}</p>
<p>So, again, you are just delegating everything to the Presenter class.</p>
<p>Does this help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ayende Rahien</title>
		<link>http://blog.coryfoy.com/2005/09/test-driving-uis-mvp-part-1/comment-page-1/#comment-569</link>
		<dc:creator>Ayende Rahien</dc:creator>
		<pubDate>Sat, 10 Sep 2005 20:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cornetdesign.com/?p=342#comment-569</guid>
		<description>I&#039;ve struggled quite a bit with trying to build testable UI.&lt;br /&gt;I eventually reached the point where I did mostly everything in MVP.&lt;br /&gt;&lt;br /&gt;The problem is actually handling the UI display logic.&lt;br /&gt;For instance, I&#039;ve a remove button that should be enabled only when I&#039;ve selected an item on a list.&lt;br /&gt;What controls this behavior?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve struggled quite a bit with trying to build testable UI.<br />I eventually reached the point where I did mostly everything in MVP.</p>
<p>The problem is actually handling the UI display logic.<br />For instance, I&#8217;ve a remove button that should be enabled only when I&#8217;ve selected an item on a list.<br />What controls this behavior?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

