<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tea-Driven Development &#187; ui</title>
	<atom:link href="http://blog.mattwynne.net/tag/ui/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mattwynne.net</link>
	<description>Matt Wynne taking it one tea at a time</description>
	<lastBuildDate>Tue, 10 Jan 2012 20:07:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Painless RMagick Install for Ruby on Rails</title>
		<link>http://blog.mattwynne.net/2007/07/01/painless-rmagick-install/</link>
		<comments>http://blog.mattwynne.net/2007/07/01/painless-rmagick-install/#comments</comments>
		<pubDate>Sun, 01 Jul 2007 01:26:26 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[file_column]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rmagick]]></category>
		<category><![CDATA[thumbnails]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://blog.mattwynne.net/2007/07/01/painless-rmagick-install/</guid>
		<description><![CDATA[One of the ironies and frustrations I find of working with open-source software is that things are changing so fast (yay!) that the documentation you find is nearly always out of date (boo!). Trying to figure out how to get the rmagick component of the handy file_column rails plug-in to play nice, I came across [...]]]></description>
			<content:encoded><![CDATA[<p>One of the ironies and frustrations I find of working with open-source software is that things are changing so fast (yay!) that the documentation you find is nearly always out of date (boo!).</p>

<p>Trying to figure out how to get the <a href="http://rmagick.rubyforge.org/">rmagick</a> component of the handy <a href="http://www.kanthak.net/opensource/file_column/">file_column</a> rails plug-in to play nice, I came across numerous gruesome posts involving 3 hour sessions building rmagick from source, sacrificing goats, etc. Yikes.</p>

<p>Then I came across <a href="http://www.danielfischer.com/2007/06/20/an-even-easier-way-to-install-rmagick-for-ruby-on-rails-development/">this great piece of news</a> and suddenly things clicked into place. Ahhh.</p>

<p>Ten minutes later, a sprinkle of <a href="http://blog.caboo.se/articles/2006/01/09/file_column-magick-and-versions">this</a>, and I have thumbnail images all over my site. Too easy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mattwynne.net/2007/07/01/painless-rmagick-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Model-View-Presenter (MVP) Anti-Patterns</title>
		<link>http://blog.mattwynne.net/2007/06/13/mvp-smells/</link>
		<comments>http://blog.mattwynne.net/2007/06/13/mvp-smells/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 19:07:50 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[mvp]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[presenter]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://blog.mattwynne.net/?p=5</guid>
		<description><![CDATA[As I work with the MVP / Passive View / Humble View pattern more in ASP.NET, I&#8217;m gaining an understanding of some common smells or anti-patterns that can happen when you try to implement this pattern and haven&#8217;t quite grokked it yet. Some of these are problems I&#8217;ve had to pull out of my own [...]]]></description>
			<content:encoded><![CDATA[<p>As I work with the MVP / <a href="http://www.martinfowler.com/eaaDev/PassiveScreen.html">Passive View</a> / Humble View pattern more in ASP.NET, I&#8217;m  gaining an understanding of some common smells or anti-patterns that can happen when you try to  implement this pattern and haven&#8217;t quite grokked it yet. Some of these are  problems I&#8217;ve had to pull out of my own code:
<h3>TOO MANY PRESENTERS SPOIL THE BROTH</h3>
When you re-use a user-control or even just a view interface on different  pages, it&#8217;s tempting to re-use a special  little presenter inside each of those  pages whose sole responsibility is for presenting that usercontrol. If you have  two different flavours of page, you might even put the call to the presenter  into a BasePage.</p>

<p>This is fine as long as those pages need no other pesenter logic, but there  are usually other controls on the page too, and they&#8217;ll need to be presented,  and before you know it you have two or three or a whole crowd of presenters  yelling at different bits of your page, telling them what to do.</p>

<p>Lesson: This is the path of darkness and complexity on the tightrope of your  untestable UI layer. Re-use presenter logic by all means, but do it inside the  presenter layer, where you can test. Everybody say Ahh&#8230; Tests&#8230;</p>

<p>Maxim: No more than one presenter to be constructed per page /  request.
<h3>THE SELF-AWARE VIEW</h3>
Within a request / response cycle, only the Page should be aware of the  existence of a presenter. The HUMBLE VIEW (implemented in a UserControl) does  what it&#8217;s told without any knowledge of who is dishing out the instructions.  Find this smell by looking for UserControls which construct their own private  little presenters, or worse still accept them as properties (usually so that  they can do filthy things like call methods on them &#8211; see ARROGANT VIEW,  below).
<h3>ARROGANT VIEW</h3>
The arrogant view is not only SELF-AWARE, but has the temerity to imagine  that it has the right to give the presenter direct instructions. Thus a  presenter can easily be relegated to nothing more that a PROXY MODEL, with logic  creeping up into the untestable view layer. Find this smell by looking for  presenters which offer public methods. Replace these direct method calls from  view-&gt;presenter with a more humble OBSERVER PATTERN, where the view raises  events containing the relevant information in the EventArgs, and the presenter  reacts accordingly (or decides not to, as is its privilege).
<h3>PRESENTER BECOMES PROXY MODEL</h3>
When you have an ARROGANT VIEW that commits the crime of directly calling  methods on a presenter, you start to see the logic in the presenter thin down to  the point where it becomes little more than a proxy for the &#8216;model&#8217; (in classic  MVC terminology) or service layer. The whole idea of MVP is to delegate the  responsibility of figuring out what to fetch from the service layer and when to  fetch it, so that the view just gets on with displaying whatever the presenter  decides it should display. When an ARROGANT VIEW gets these kind of notions,  logic that belongs in a (testable) presenter is tangled up with display logic in  the view, and it&#8217;s time to roll up your sleeves and refactor.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mattwynne.net/2007/06/13/mvp-smells/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

