Winston,
We roll our own framework for each (think we have about 6 systems using the MVP pattern from memory). It's quite a trivial operation. I highly recommend using events. Their pretty straight forward and if you do need to pass something around then create your own event arguments. Have you taken a look at Phil Haacks primer that he wrote? http://haacked.com/archive/2006/08/09/ASP.NETSupervisingControllerModelViewP resenterFromSchematicToUnitTestsToCode.aspx The only thing that we don't do according to Phil Haacks example is pass in our data services. We use IoC pattern for these using a Service Locator facade. I highly recommend picking up an IoC framework to help testability too. We use the following open source libraries to assist in our MVP development: . NUnit - testing . Moq - Mocking during testing . Autofac - Inversion of control I also highly recommend speaking to Damian Edwards as he is a big advocator of MVP (and is the co-creator of the framework you were talking about). Best regards, Michael Lyons From: [email protected] [mailto:[email protected]] On Behalf Of Winston Pang Sent: Thursday, 25 March 2010 10:39 AM To: [email protected] Subject: ASP.NET MVP Alright guys, So at work, we're looking to use MVP in our project. Can't use any frameworks, so webformsmvp is out of the question. The pattern seems trivial enough, but there seems to be a variety of implementations. One thing I can't pick from is: 1) Add events on the View interface and have the view raise these events that the Presenter has subscribed to, ticks for looser coupling, but I'm not sure what the ramifications are for testing, would it mean when I mock my view, I'd have to raise these events on the view. 2) Have the underlying operations exposed on the Presenter, and have the View invoke the operations, but more coupling, but it means when I'm testing I could just invoke the operations on the presenter and test the results on the View. What's everyones approach on this? Cheers, Winston
