how to best organize an MVP solution

R

Registered User

I have a question about how an MVP solution is best organized.

The solution contains three interfaces (model, view, presenter). There
are two concrete models and two concrete presenters. The solution is
currently organized as three projects: model, presenter and UI. The
model and presenter projects each contain the related abstract and
concrete types. The view interface is also in the presenter project.

After looking at the solution I'm thinking the abstract types should
all be in the same project, perhaps even in their own project. Such a
solution would contain interface, model, presenter and UI projects.
What constitutes best practices for organizing such a solution?

regards
A.G.
 
R

Registered User

I consider the presenter and the view as part of the UI so they have
folders in the UI project to hold the classes and interfaces.
I'm looking at a situation where the same model-presenters will be
used by multiple web sites each with their own implementation of the
IView.
A service layer project with a service class sits between the
presenter and the model.

The Service layer has an IService.

The purpose of this project was simply to use a single IView
implementation with multiple implementations of an abstract
Presentation type. There is no interest in completeness when writing
throw-away code ;)

regards
A.G.
 
R

Registered User

- snip -

IMHO, the organization of the types in assemblies is somewhat orthogonal
to the overall MVP design. It should instead relate to broader
questions of where types _need_ to be, given your choice of assembly
break-down.

- snip -

I kind of figured this but I've been wrong before. Thank you.

regards
A.G.
 

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