I'm a software developer, and like so many others, I'm always looking for ways to improve my tests and my designs. Recently, I've been interested in user interface design and development. I'm a big fan of test-driven development, but GUI unit testing is a difficult problem (anyone who's seriously tried TDD discovers this very early on).
One approach to GUI TDD that I've been experimenting with is the Presenter First development approach. Presenter First is a variation of the Model-View-Presenter? (MVP) or Model-View-Controller? (MVC) design pattern where the Presenter component is written and tested first. Although I have a full understanding of the basics, I have a few questions that I haven't yet found answers for:
- Does Presenter First result in simpler code, or more complex code?
- How "evolveable" is a Presenter First application?
- Do the benefits of Presenter First outweigh the costs (learning curve, added development time, etc)?
- What other GUI TDD options exist, and how do they compare to Presenter First?
Presenter First Example App
To experiment with Presenter First, I wrote a simple time zone conversion utility, (brilliantly named TimeZoneConverter). I'm hoping to get some feedback on the application at the conference. Specifically, I'd love to discuss:
- Did I implement the Presenter First pattern correctly? Are there ways I could have applied the pattern that I missed, or did incorrectly?
- An overall evaluation of the design: is it simple? Is it too costly, or difficult to interpret? How could the design be improved?
- What tools or guidelines could I have used (or invented) to make the process easier/more productive?
TimeZoneConverter is hosted on Google Code. You can download the released binaries and source code here, or you can browse the latest source code on-line. I've enabled anonymous code reviews, so you can add comments directly to the source as you browse.
Note: When reviewing the code, keep in mind that I substituted the term "Manager" for "Presenter". The manager classes in the code serve as the presenters (controllers) for the application.
Here are some other things I'm looking forward to exploring at the conference:
- I currently work in an environment where unit testing is encouraged, but not widely practiced. I understand the benefits of developer-created automated tests, but how can I help others come to the same realization?
- What is user acceptance testing, and what are it's benefits? What tools exist?
- How can I thank my QA Team? I appreciate what they do, but I'm not sure how to thank them.