I have a windows forms project using the Model View Presenter pattern and would like to build a web forms project on top of the same MVP structure.
The windows forms project knows nothing of ASP.Net Membership and just communicates via the presenter to the model and then to the business layer to do user log on/validation. In the web forms project I have created custom classes that inherit from the built in membership and role provider classes so that I can use the existing user and roles tables as well as integrate nicely with the ASP.Net login controls. However, currently I have had to reference the business layer directly in the custom membership class to validate users, so if I follow MVP, the membership code shouldn't be in the view with references to business layer, it should be in the model but that means referencing System.Web.Security in the model.
Is there a way to still use ASP.Net membership with MVP where the webforms and winforms projects are built on top of the same MVP structure? I think I need to pass in the dependency on membership to the presenter and then to the model but can't quite see a clean way to do this.
One of the commonly mentioned benefits of MVP is that it allows for building different UI's on top of the same presenters, models, etc. However, in practice, does this really work well or is it best to implement MVP separately per UI technology?
Also in relation to the web forms project, is Session state something that the view can just deal with or does this need wrapping with a custom class and interface and passing to the presenter to maintain?