Tags

, ,

Presenter First (PF) is a technique for organizing source code and development activities to produce fully tested GUI applications from customer stories using test-driven development.

As we all know, interfaces be them for desktop applications or for web applications are hard to get right and usually get bogged down with validation and business code that we know shouldn’t be there but it is so convenient that we always end up succumbing to the temptation. This eventually escalates and we end up with very long test plans because there isn’t any sane way of unit testing the code that is behind the web pages or windows forms.

The point of Presenter First is to move as much code as possible out of the UI and into classes that can be unit tested.

Here is an annotated bibliography:

The Humble Dialog Box by Michael Feathers

Start here! This short article/tutorial inspired the creators of Presenter First and it puts you in the right mindset for understanding the concepts presented later.

http://www.objectmentor.com/resources/articles/TheHumbleDialogBox.pdf

Presenter First: Organizing Complex GUI Applications for Test-Driven Development

This is the seminal article with an in-depth explanation of the process using Ruby. Note that this is all language agnostic and applies to C#, Perl, VB, etc.

http://atomicobject.com/files/PresenterFirstAgile2006.pdf

Brian Marick’s Presenter First wireframe demo (quicktime movie)

Interesting screencast and take on the method. Very easy to follow but you need to install Quicktime.

http://www.testing.com/cgi-bin/blog/2007/01/05#wireframe2

Three part video interview with the guys from Atomic Object

Ron Jacobs from http://www.arcast.tv/ interviews Atomic Object’s developers in a very long but very interesting discussion about systems architecture and Presenter First.

http://channel9.msdn.com/ShowPost.aspx?PostID=312305

Home page of Presenter First

More links and sample code. Especially the primer in c#: http://atomicobject.com/files/Puzzle.zip

http://atomicobject.com/pages/Presenter+First

http://en.wikipedia.org/wiki/Presenter_First

Other MVP articles

Model View Presenter using Dependency Injection and Threading support
http://www.codeproject.com/KB/cs/ModelViewPresenterWithDI.aspx

A series of articles about MVP in Codeproject
http://www.codeproject.com/KB/architecture/DotNetMVPFramework_Part1.aspx

A complete series on how to apply this family of patterns to UI design using Winforms. Recommended.
The link is very long so click here

Final Words

This article should have appeared before the series that I am developing about Presenter First but somehow got left for later. The series contains so far two articles:

https://codefornothing.wordpress.com/2007/09/15/model-view-presenter-in-visual-basic-6-part-1/
https://codefornothing.wordpress.com/2007/10/15/model-view-presenter-in-visual-basic-6-part-2/

There are more to come soon. I intend to finish the VB6 saga with a third part and then start a new series about Presenter First and .NET.

Advertisements