<?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: Using Model-View-Presenter (MVP) pattern in Compact Framework</title>
	<atom:link href="http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/</link>
	<description>Technology, mobility and software development</description>
	<lastBuildDate>Thu, 17 May 2012 03:13:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Using Model-View-Presenter (MVP) pattern in Windows Phone 7 projects &#124; www.nalli.net</title>
		<link>http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/comment-page-1/#comment-29831</link>
		<dc:creator>Using Model-View-Presenter (MVP) pattern in Windows Phone 7 projects &#124; www.nalli.net</dc:creator>
		<pubDate>Tue, 12 Apr 2011 22:10:23 +0000</pubDate>
		<guid isPermaLink="false">http://breathingtech.com/?p=671#comment-29831</guid>
		<description>[...] describing the MVP-pattern since I covered that pretty well in another post I wrote a while back: Using Model-View-Presenter (MVP) pattern in Compact Framework. What I will do is to show an example on how you can design your Windows Phone 7 app architecture [...]</description>
		<content:encoded><![CDATA[<p>[...] describing the MVP-pattern since I covered that pretty well in another post I wrote a while back: Using Model-View-Presenter (MVP) pattern in Compact Framework. What I will do is to show an example on how you can design your Windows Phone 7 app architecture [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Using Model-View-Presenter (MVP) pattern in Windows Phone 7 projects</title>
		<link>http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/comment-page-1/#comment-29042</link>
		<dc:creator>Using Model-View-Presenter (MVP) pattern in Windows Phone 7 projects</dc:creator>
		<pubDate>Thu, 31 Mar 2011 16:05:26 +0000</pubDate>
		<guid isPermaLink="false">http://breathingtech.com/?p=671#comment-29042</guid>
		<description>[...] describing the MVP-pattern since I covered that pretty well in another post I wrote a while back: Using Model-View-Presenter (MVP) pattern in Compact Framework. What I will do is to show an example on how you can design your Windows Phone 7 app architecture [...]</description>
		<content:encoded><![CDATA[<p>[...] describing the MVP-pattern since I covered that pretty well in another post I wrote a while back: Using Model-View-Presenter (MVP) pattern in Compact Framework. What I will do is to show an example on how you can design your Windows Phone 7 app architecture [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Using open source project GPS.NET 3.0</title>
		<link>http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/comment-page-1/#comment-8543</link>
		<dc:creator>Using open source project GPS.NET 3.0</dc:creator>
		<pubDate>Tue, 31 Aug 2010 18:09:27 +0000</pubDate>
		<guid isPermaLink="false">http://breathingtech.com/?p=671#comment-8543</guid>
		<description>[...] The following code examples are using the Model View Presenter (MVP) pattern. I will not explain the pattern in this post, but if you want to know more about the MVP pattern you can have a look at a previous post I have written: Using Model-View-Presenter (MVP) pattern in Compact Framework. [...]</description>
		<content:encoded><![CDATA[<p>[...] The following code examples are using the Model View Presenter (MVP) pattern. I will not explain the pattern in this post, but if you want to know more about the MVP pattern you can have a look at a previous post I have written: Using Model-View-Presenter (MVP) pattern in Compact Framework. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per Ola Sæther</title>
		<link>http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/comment-page-1/#comment-5702</link>
		<dc:creator>Per Ola Sæther</dc:creator>
		<pubDate>Thu, 20 May 2010 18:12:17 +0000</pubDate>
		<guid isPermaLink="false">http://breathingtech.com/?p=671#comment-5702</guid>
		<description>Hi Chamkaur, I am glad that you enjoyed reading the post.

I would not let the presenter call a FeedbackMessage method in the view. The easiest is to let the presenter handle data and pass data on to the view. It is the views&#039; responsibility to decide what to do with the data from the presenter.

One solution could be to add one more parameter to the LoginValidated method for example LoginValidated(bool successful, string message)
This way you can also pass on the error message from the presenter if any and display this in your view.

I often tend to do simple not null or empty test in the view without calling the presenter with those data.

I hope this answered your question.</description>
		<content:encoded><![CDATA[<p>Hi Chamkaur, I am glad that you enjoyed reading the post.</p>
<p>I would not let the presenter call a FeedbackMessage method in the view. The easiest is to let the presenter handle data and pass data on to the view. It is the views&#8217; responsibility to decide what to do with the data from the presenter.</p>
<p>One solution could be to add one more parameter to the LoginValidated method for example LoginValidated(bool successful, string message)<br />
This way you can also pass on the error message from the presenter if any and display this in your view.</p>
<p>I often tend to do simple not null or empty test in the view without calling the presenter with those data.</p>
<p>I hope this answered your question.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chamkaur</title>
		<link>http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/comment-page-1/#comment-5690</link>
		<dc:creator>Chamkaur</dc:creator>
		<pubDate>Thu, 20 May 2010 05:09:09 +0000</pubDate>
		<guid isPermaLink="false">http://breathingtech.com/?p=671#comment-5690</guid>
		<description>Hi Per Ola,

I enjoyed reading your post. great read. very clear with regards to MVP implementation.

I need some feedback with regards to the LoginValidated method in the LoginScreen class.

it says 

if (loginSuccessful)
{
// Go to next screen…
}else
{
// Display feedback to user…
}

My initial thoughts was to code the following in the else block

MessageBox.Show(&quot;Incorrect login&quot;);

Should I do this?  or should i be activating the messagebox from the presenter? I am concern that I am not following the MVP principles.  or maybe I should create another method in the ILoginView interface with the following

void FeebbackMessage(string message);

and in my LoginPresenter class, I have the following

public void ValidateLogin(string username, string password)
        {
            if (username.Equals(&quot;&quot;) &#124;&#124; password.Equals(&quot;&quot;))
            {
                _currentView.FeedbackMessage(&quot;Please enter Username/Password&quot;);
            }
            else
            {
                //  Validate user name and password
                bool loginSuccessful = Login(username, password);
 
                //  send response to view
                _currentView.LoginValidated(loginSuccessful);
            }
        }

What should be the best practice here?  thanks again for your post.</description>
		<content:encoded><![CDATA[<p>Hi Per Ola,</p>
<p>I enjoyed reading your post. great read. very clear with regards to MVP implementation.</p>
<p>I need some feedback with regards to the LoginValidated method in the LoginScreen class.</p>
<p>it says </p>
<p>if (loginSuccessful)<br />
{<br />
// Go to next screen…<br />
}else<br />
{<br />
// Display feedback to user…<br />
}</p>
<p>My initial thoughts was to code the following in the else block</p>
<p>MessageBox.Show(&#8220;Incorrect login&#8221;);</p>
<p>Should I do this?  or should i be activating the messagebox from the presenter? I am concern that I am not following the MVP principles.  or maybe I should create another method in the ILoginView interface with the following</p>
<p>void FeebbackMessage(string message);</p>
<p>and in my LoginPresenter class, I have the following</p>
<p>public void ValidateLogin(string username, string password)<br />
        {<br />
            if (username.Equals(&#8220;&#8221;) || password.Equals(&#8220;&#8221;))<br />
            {<br />
                _currentView.FeedbackMessage(&#8220;Please enter Username/Password&#8221;);<br />
            }<br />
            else<br />
            {<br />
                //  Validate user name and password<br />
                bool loginSuccessful = Login(username, password);</p>
<p>                //  send response to view<br />
                _currentView.LoginValidated(loginSuccessful);<br />
            }<br />
        }</p>
<p>What should be the best practice here?  thanks again for your post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per Ola Sæther</title>
		<link>http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/comment-page-1/#comment-5594</link>
		<dc:creator>Per Ola Sæther</dc:creator>
		<pubDate>Fri, 14 May 2010 14:52:08 +0000</pubDate>
		<guid isPermaLink="false">http://breathingtech.com/?p=671#comment-5594</guid>
		<description>Hi Jeff, thank you for your comment.
I have used this pattern in three .NET Compact Framework projects at my work (three different industrial applications for external customers) and I am also using this pattern for one of my pet projects.

I have not had to handle different devices and screen sizes, the project are running on rugged devices with a fixed screen size. As I see it the ILoginView is implemented by your Screen and used by your Presenter. So the LoginScreen and the WideScreenLoginScreen will implement the same ILoginView and use the same Presenter. The functionality and data are similar for your two screens, only the layout differs. The layout should be handled in your Screen and not in the view or the presenter.

If you have several similar Views then I think you should use inheritance were you find that natural. As in all other patterns you do not want to duplicate your code. I also often create one or several &quot;super&quot; screens containing buttons, headers and common functionality and then all other screens in my project inherit from these.</description>
		<content:encoded><![CDATA[<p>Hi Jeff, thank you for your comment.<br />
I have used this pattern in three .NET Compact Framework projects at my work (three different industrial applications for external customers) and I am also using this pattern for one of my pet projects.</p>
<p>I have not had to handle different devices and screen sizes, the project are running on rugged devices with a fixed screen size. As I see it the ILoginView is implemented by your Screen and used by your Presenter. So the LoginScreen and the WideScreenLoginScreen will implement the same ILoginView and use the same Presenter. The functionality and data are similar for your two screens, only the layout differs. The layout should be handled in your Screen and not in the view or the presenter.</p>
<p>If you have several similar Views then I think you should use inheritance were you find that natural. As in all other patterns you do not want to duplicate your code. I also often create one or several &#8220;super&#8221; screens containing buttons, headers and common functionality and then all other screens in my project inherit from these.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/comment-page-1/#comment-5511</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Mon, 10 May 2010 16:10:24 +0000</pubDate>
		<guid isPermaLink="false">http://breathingtech.com/?p=671#comment-5511</guid>
		<description>Great concise article. I am a .NET developer but have been applying this to some J2ME projects recently. I am curious if you have used this pattern beyond a design guide and in a perhaps more concrete implementation. If you needed multiple ILoginView implementations for different mobile devices, for example, how would it be decided which ILoginView to use... eg. LoginScreen or WidescreenLoginScreen. Something like that.

Also, if you had a few similar views like IEmployeeView, IEmployerView, IContractorView... would you create an IPersonView from which the former views inherited? Just curious. ;)</description>
		<content:encoded><![CDATA[<p>Great concise article. I am a .NET developer but have been applying this to some J2ME projects recently. I am curious if you have used this pattern beyond a design guide and in a perhaps more concrete implementation. If you needed multiple ILoginView implementations for different mobile devices, for example, how would it be decided which ILoginView to use&#8230; eg. LoginScreen or WidescreenLoginScreen. Something like that.</p>
<p>Also, if you had a few similar views like IEmployeeView, IEmployerView, IContractorView&#8230; would you create an IPersonView from which the former views inherited? Just curious. <img src='http://breathingtech.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per Ola Sæther</title>
		<link>http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/comment-page-1/#comment-2584</link>
		<dc:creator>Per Ola Sæther</dc:creator>
		<pubDate>Mon, 21 Dec 2009 13:07:13 +0000</pubDate>
		<guid isPermaLink="false">http://breathingtech.com/?p=671#comment-2584</guid>
		<description>Hi Sri: I am glad that you liked this MVP example. I do not know if there are more complex examples else where. I think that this should be enough to start using MVP and also to build quite complex solutions on MVP. Just follow the basic pattern described here.</description>
		<content:encoded><![CDATA[<p>Hi Sri: I am glad that you liked this MVP example. I do not know if there are more complex examples else where. I think that this should be enough to start using MVP and also to build quite complex solutions on MVP. Just follow the basic pattern described here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sri</title>
		<link>http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/comment-page-1/#comment-2437</link>
		<dc:creator>Sri</dc:creator>
		<pubDate>Tue, 15 Dec 2009 11:42:53 +0000</pubDate>
		<guid isPermaLink="false">http://breathingtech.com/?p=671#comment-2437</guid>
		<description>This is really a good example of the MVP...
can you tell me where i can find more complex examples?</description>
		<content:encoded><![CDATA[<p>This is really a good example of the MVP&#8230;<br />
can you tell me where i can find more complex examples?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per Ola Sæther</title>
		<link>http://breathingtech.com/2009/using-model-view-presenter-mvp-pattern-in-compact-framework/comment-page-1/#comment-2035</link>
		<dc:creator>Per Ola Sæther</dc:creator>
		<pubDate>Wed, 25 Nov 2009 15:52:56 +0000</pubDate>
		<guid isPermaLink="false">http://breathingtech.com/?p=671#comment-2035</guid>
		<description>Hi George,
Thanks for the GPS .NET 3.0 information. I have had a quick look at it and I like what I see. By using this framework you will be able to develop a much more sophisticated GPS application than you will by using the WindowsMobile.Sample.Location project.

I will for sure consider using this framework in my pet project.
Thanx :)</description>
		<content:encoded><![CDATA[<p>Hi George,<br />
Thanks for the GPS .NET 3.0 information. I have had a quick look at it and I like what I see. By using this framework you will be able to develop a much more sophisticated GPS application than you will by using the WindowsMobile.Sample.Location project.</p>
<p>I will for sure consider using this framework in my pet project.<br />
Thanx <img src='http://breathingtech.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

