Presenter First in GTK+ and C – Updated for 2012

About two years ago, I created a sample project that demonstrates Presenter First in the context of GTK+ and C. I recently went ahead and updated the project to work with the latest and greatest versions of the tools it is built upon. Find it here!


My example builds upon several tools and technologies – primarily Presenter First, Ceedling, the GTK+ GUI toolkit, and C.

Presenter First is a design pattern that emphasizes self-descriptiveness, separation of concerns, and testability. Ceedling provides a suite of tools for building, running, and testing a C or C++ application. Throughout the example I use Unity for unit testing and CMock for mocking components in a C environment. And, of course, C and GTK+ provide the context of the application.

Presenter First calculator

Over the last two years the technologies, tools, and environments have changed, so I’ve updated the example to ensure it now runs well under:

Check it out if you’re new to Presenter First! I hope it helps in understanding the concepts, especially in an environment that isn’t as friendly to testing as we’d prefer.