MVP 'suitable' for .Net 2 Winform App?

  • Thread starter Thread starter Pritcham
  • Start date Start date
P

Pritcham

Hi

This may seem a dumb question and I apologise in advance if it is,
but.....

I've been developing 'hobby-apps' for quite a few years now, nothing
serious but just dabbling really. I've now got a chance to develop
something with a bit more meat on it and am therefore looking at
starting out in the best way I can as far as design etc goes.

I've already got the data side sorted via a data access layer etc and
am now just looking at the presentation layer.

I've obviously been doing some googling on best practices etc as far as
presentation layer goes and have come across the MVP pattern (and MVC
naturally) and have now got enough of an understanding (I think) to
implement it in my app, the question is - should I?

I've read a few contrary views on the subject (both for and against)
and just wondered what others were doing - I know there's naturally
more effort involved in implementing MVP but is it something that, in
some instances, is done for the sake of it (i.e. pattern overload!) or
does it really have that much benefit that it's worth it?

Opinions/advice welcome!!

Thanks in advance
Martin
 
"Pritcham" <[email protected]> a écrit dans le message de
news: (e-mail address removed)...

| I've obviously been doing some googling on best practices etc as far as
| presentation layer goes and have come across the MVP pattern (and MVC
| naturally) and have now got enough of an understanding (I think) to
| implement it in my app, the question is - should I?

Have you read my article son MVP in Delphi ? They are on my website
www.carterconsulting.org.uk

I have proted this implementation to C# and have found it perfectly
suitable, but I have certainly been able to simplify the framework due to
the facilities, generics and metadata provided by .NET 2.0.

| I've read a few contrary views on the subject (both for and against)
| and just wondered what others were doing - I know there's naturally
| more effort involved in implementing MVP but is it something that, in
| some instances, is done for the sake of it (i.e. pattern overload!) or
| does it really have that much benefit that it's worth it?

Once the initial framework is designed, there is very little extra effort in
using it in anger.

The key use for MVP is to remove *all* logic code from your forms. I use the
concept of the Interactor as a wrapper class around the .NET Binding class.
This allows me to write event handlers in the Interactor instead of the
usual place in the form class.

Joanna
 
Hi

Thanks for that Joanna - I must admit that I was kind of edging towards
implementing MVP but just wanted a sense check to make sure I wasn't
just implementing a pattern for the sake of it
 
Back
Top