Application.Run and ModelViewPresenter Pattern

J

Jeff Jarrell

I am using the variation of a ModelViewPresenter pattern, now called
Supervising Controller\ Passive view.

The essense of the pattern is that all of the logic is in the controller
classe and the form has no logic. That make is easy to change or swap out
the visual component for testing or branding purposes.

Application.Run() takes a FORM object. But in this pattern (my
implementation) the view (form) is launched from the presenter.

It seems to work if I take out the Application.Run() and replace it with the

IPresenter.Execute(showModal)

But should I be looking deeper here? Am I losing something that will cause
me grief later?

Thanks,
jeff
 
N

Nicholas Paldino [.NET/C# MVP]

Jeff,

I think you should, personally, as I have no clue what the IPresenter
interface is, as it's not a part of the standard framework.

I imagine that the implementation of IPresenter.Execute is possibly
calling the static Run method on the Application class (assuming that the
implementation is the top level form), but without seeing any code or
references, it's hard to say.
 
J

Jeff Jarrell

Nicholas,

IPresenter is mine. I 'could' call Application.Run on the toplevel form.
There are a couple twists and turns that I won't go into detail here, but
you helped with the solution.

Thanks,
jeff


Nicholas Paldino said:
Jeff,

I think you should, personally, as I have no clue what the IPresenter
interface is, as it's not a part of the standard framework.

I imagine that the implementation of IPresenter.Execute is possibly
calling the static Run method on the Application class (assuming that the
implementation is the top level form), but without seeing any code or
references, it's hard to say.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Jeff Jarrell said:
I am using the variation of a ModelViewPresenter pattern, now called
Supervising Controller\ Passive view.

The essense of the pattern is that all of the logic is in the controller
classe and the form has no logic. That make is easy to change or swap out
the visual component for testing or branding purposes.

Application.Run() takes a FORM object. But in this pattern (my
implementation) the view (form) is launched from the presenter.

It seems to work if I take out the Application.Run() and replace it with
the

IPresenter.Execute(showModal)

But should I be looking deeper here? Am I losing something that will
cause me grief later?

Thanks,
jeff
 
B

Bart

You could try to ask this question in "borland.public.delphi.oodesign"
newsgroup. Although this is a Delphi newsgroup there are several people in
my opinion who could answer your question in detail.

Good luck,

Bart
 

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