MVP pattern and application/user settings in WinForm

  • Thread starter Thread starter Napoleone1981
  • Start date Start date
N

Napoleone1981

Hi all,
I'm trying to use the MVP pattern (without CAB or other frameworks) to build
a simple (but not trivial) WinForm application with C# 2.0.

I'm relative new to this pattern and I have a little question...

I made a separated assembly for the Presenter and one for the Gui (View).
Inside the presenter I need to create a Model object that connects to a
server, so I need username, password, ip, etc... These fields are stored in
the settings file of the application (so in the View assembly) some at user
level and some at application level...
The setting file is not visible from the Presenter assembly... and I don't
want to use global::Properties...etc cause it seems to break the pattern...
Am I right??

What is the right method to access these values conforming to the MVP
pattern?

Do I need a defaultUserName and UserName properties in the IView interface??
If yes, set and get or only get?? Who store the modified settings??
 
Just a thought: Have you attempted to ask Martin Fowler? I suppose this is
his design, so he'd be the first person I'd think to ask.
 
Back
Top