Presenter First - MVP put into an agile process

Last time, I have tried to show, how do decouple the presentation layer. Today the topic or point of view is slightly different. The Model-View-Presenter patterns can be integrated as default construction of your presentation layer into your development process. Atomic Object has build a complete agile process around the MVP pattern, called "Presenter First". This process includes Test-Driven-Development (TDD), Story-Driven-Development and the MVP pattern.

The Model-View-Presenter pattern can be used to build domain logic and presenters based on the user stories, without a single line of UI code (or a single click). The views are all mocked out using a mocking framework (JMock, EasyMock, NMock, RhinoMock, ...). All domain logic and presentation logic is tested in isolation, the presenter comes first (well, before the view).

So I would see this process broken down into the following steps:

  1. Write a unit test, covering your user story in the domain layer
  2. Fulfill with domain code, until green
  3. Write a unit test for your presenter
  4. Fulfill with presenter code, until green
  5. Write an integrative unit test from the presenter down to the domain (at least you should)
  6. Now it's time to build some UI

My conclusion is, that the Model-View-Presenter pattern really decouples any UI concerns from the actual user stories and their presenter/domain implementation.

Technorati-Tags:

Reference Material: Atomic Object - Presenter First

0 Comments:

Post a Comment




 

Copyright 2006| Blogger Templates by GeckoandFly modified and converted to Blogger Beta by Blogcrowds.
No part of the content or the blog may be reproduced without prior written permission.