MVP pattern and application/user settings in WinForm

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??
 
J

jp2msft

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top