Nick Parker
My ramblings on .NET...

Model View Presenter Redux

Tuesday, 12 September 2006 15:53 by nickp

The Model View Presenter (MVP) pattern seems to be all the rage within the last year; it must be the new pink. While I agree this is a great pattern to decouple various logical layers within a system, I think we are missing an important core piece to the puzzle.

In my opinion, humble of course, the Model is purely a representation of my data, and I prefer to depict that in the form of a Data Transfer Object (DTO), this is the ubiquitous PONO (Plain Old .NET Object) - (Edit: Domain Model's are welcome too) . The View is typically defined as an interface that my UI will provide as implementation. The Presenter will then orchestrate the interaction of my Model to my View. But wait, where does my Model come from? This is where a Service layer comes into play. While there are many different terms for this layer, this layer is responsible for extracting our Model from somewhere (i.e., service implementation). Most commonly, our Presenter will perform specific requests from the Service layer in its orchestration process. I would like to refer to this pattern from now on as MVPS (Model View Presenter Service). I’d love to hear feedback on this, in particular if you don’t agree with me – who doesn’t love a hearty debate?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

August 20. 2008 03:18