What is Presenter First?

Presenter First (PF) is a technique for organizing source code and development activities to produce fully tested applications from customer stories using Test-Driven Development. Though it can be applied in a variety of settings, it is most often used in GUI applications.



”I want to thank you for the Ron Jacobs interview and for posting the Presenter First white paper online. The pattern was an important element in getting a recent project off the ground and I have to give you guys a lot of credit for improving the quality of the code we are writing.”

Brooke Hamilton, Principal Software Engineer, FM Global



History

The core idea of Presenter First came when Michael Marsiglia (Atomic Object) and Brian Harleton (X-Rite) were working on an application team at X-Rite. The pain they felt on adapting a large GUI application suite to the needs of a major customer drove them to create what later developed into and became known as Presenter First. David Crosby worked with Mike and Brian, wrestled with the problems of triad composition and instantiation, and refined the process and motivations for building Presenter First style. The Burke Porter Dyno Host project was the first large project done in Presenter First style from inception.


Papers

“Big, Complex, and Tested? Just Say ‘When’”

Appeared in Better Software, February 2007

Better Software Magazine reprint

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

The definitive technical description of Presenter First from the Agile International Conference, 2006.

Jump to our Papers page to read the abstract or open the PDF here.

Agile 2006 Conference paper


Examples

Complete source code for the Ruby Contact Manager example cited in the Better Software paper.

Simple Java example of Presenter First that illustrates the structure of a simple triad – uses jmock and junit for testing.
[ZIP]

C# Presenter First example – VS2003 project for a sliding puzzle game
[ZIP]

Objective C/Cocoa Presenter First example – Simple contact manager application
[ZIP]

Java Presenter First + Adapter example – Java (ant-only and/or IntelliJ) Swing application that demonstrates the Adapter pattern extension to Presenter First, including how we can use an Adapter to encapsulate the usage of rich GUI library components via their built-in data bindings.
[ZIP] – Source and build files
[JAR] – Compiled executable jar of the example. “java -jar AdapterExample.jar” to run.

Presenter First in the context of GTK+ and C
Find the code at pf_gtk on GitHub
Companion articles describing the project can be found here: original article and updated for 2012


Resources

The original paper on Presenter First was not formally published. It describes the core idea and many of the advantages of using this technique.
[PDF]

MVP/Presenter First Video Example by Brian Marick

Part 1 Part 2 & Part 3 of a video Podcast series with Ron Jacobs of ARCast.

Multiple Case Studies On Presenter First: TDD for Both Stand-alone GUI-based application And Eclipse Plug-in Development

Mocking tools such as NMock, OCMock, JMock, and HardMock are helpful in speeding Presenter First unit testing.

Visual Studio VB macros for MVP navigation in C# projects (includes a Test file creator).
[TXT]

Christopher Atkins’ approach to PF in ASP.NET: Presenter First with POA


Contributed Tools

A Modeling Tool for the Presenter First Pattern by Brooke Hamilton of FM Global

Creating a DSL for Presenter First – Brooke also provides an interesting write-up on his extension of Presenter First and how to describe the pieces using a succinct DSL

Copyright © Atomic Object LLC. — +1 616 776 6020 — Contact Us

Edit