Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Building the basics of an MVP WinForms app.

I have created various folders in my WinForms project:

Models
Views
Presenters
Interfaces

and I am ready to build an interface for my first View, let's call it the DispatcherView dialog.

What should the view's interface inherit from?  Form?

Or do I make the View inherit from Form then also implement the IDispatcherView?

Also, DispatcherPresenter does not inherit from any object or implement any interface.  Right?

How about the DispatcherModel?


Please make suggestions.

Thanks,
newbieweb
ASKER CERTIFIED SOLUTION
Avatar of Avodah
Avodah
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

DaTribe,

Thanks. That helps.  For now, multiple Views is the last of my concerns.

I prefer passing in the IView to the Presenter's constuctor.  Is this "inversion of control"?

Do I also need a Dependency Injection tool like the Spring Framework?  I never really understood why I needed more than what you have already described.


- The View implements an IView
- The View constructs the Presenter
- The Presenter gets the IView on construction
- The View can call the Presenter through a private member variable
- The Presenter can call the View through a private member variable

What am I missing?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Finally, I got an explanation of what DI tools can do for me.  At the moment, I am the sole developer on a tiny addition to a legacy program and ned it finished ASAP.  Many of the great things I can do with MVP will have to wait until my company grows by at least one person :)

Thanks.
Glad to help anytime