This project is read-only.
Features | Tutorial | Documentation | Downloads | Links | F.A.Q. | Glossary | Current Release


Welcome to Project NMVP Framework


Date News
16-Aug-2007 NMVP V1.0.0 is in the Oven - Help out by contributing to it's vision statement at Vision Statement. By the way, 21.000+ visitors to the project and growing. Thanks for the interest guys!
11-Feb-2007 The first three chapters of the book "NMVP Inside-Out" have been released! Make sure you check them out here!
03-Feb-2007 Release 0.3.0 Production is out! This is the release that features both bindable MvpContainer for ASP.Net and the new MockFactory that allows for ZERO-WORK mocking! Be sure to check both out!
03-Feb-2007 Srihari Suresh joined the team! Welcome aboard buddy!
27-Jan-2007 Release 0.2.0 Production is out! It has tons of new features and a tutorial on all of those as well as framework structure explanation will be posted soon. Keep posted!

Showing News 1-5 of 12 - Click here for older news


NMVP is an acronym for .Net Model-View-Presenter Framework.
The NMVP Framework is a framework for helping in building Model-View-Presenter (MVP) based UI architectures.

Even though it´s possible to create very simple MVP Architectures using NMVP, it really shines when used to build Composite MVP Architectures. If you don´t know MVP yet, please check out our Links page. There are several good articles about it there.


First let´s understand what every component does in the bigger picture. Each one of these classes is better documented in the reference of the project (that comes with each release).

  • Resolver - This is the Dependency Injection container and is responsible for resolving a fully configured and hooked HostPresenter.
  • Host Presenter - The HostPresenter class is responsible for orchestrating every single other presenter. This is the component that receives the Init, Load and Save calls from the Host (the ASP.Net Page for instance). This class has references to the current Security Context (ISecurityContext), the current Configuration Context (Config) and for the current Transaction Context (used for maintaining the same transaction across different presenter calls).
  • IHost - The IHost interface is responsible for defining the contract of a Host. This interface contains a property called IsValid that is responsible for telling the HostPresenter the state of validity of the Host.
  • IContract - The IContract interface defines the contract that the view must implement. Every single interface that views implement MUST inherit from this one.
  • IContainer - The IContainer interface defines a container. A container is a model that has dynamic models attached to it. Likely this model will be used for multiple relationships like participants on a project, for instance (you don´t know at first hand how many there will be, so you need a dynamic container).
  • ISecurityContext - The ISecurityContext interface is responsible for defining a security context model. Any implementation of this interface can be used in the framework as Security Context.
  • Config - The Config class is responsible for obtaining the current MVP configuration (for the model being executed). This class reads this configurations of a XML configuration file.
  • PresenterBase - The PresenterBase class is the base class of the generic presenter. It has a few base implementations of the main methods, and a few important properties and events.
  • Presenter<> - The Presenter<> class is the base class from whom all the presenters (all but the Container ones) must inherit, since it allows a type-safe usage of the Model that the presenter is bound to. This class inherits from PresenterBase.
  • ContainerPresenterBase - The ContainerPresenterBase class is responsible for performing container presenter operations. This is the class that the generic ContainerPresenter inherits from. This class inherits from PresenterBase.
  • ContainerPresenter<> - The ContainerPresenter<> class is the class from whom all the ContainerPresenter classes must inherit, since it allows a type-safe usage of the Container that the presenter is bound to. This class inherits from ContainerPresenterBase.

ASP.Net Support


NMVp supports ASP.Net usage of presenters by default. If you want your page and/or user controls to be automatically hooked to their presenters all you have to do is inherit from MvpPage or MvpUserControl and everything gets done for you.

If you inherit from MvpPage all you have to do is add the presenter class full name in the header of your page:

<%@ Page Language="C#" AutoEventWireup="true" Codebehind="LoginMvpPage.aspx.cs" Inherits="NMvp.Web.Testing.LoginMvpPage"
PresenterId="NMvp.TestModel.Login.LoginFormPresenter, NMvp.TestModel" %>

If you prefer that it´s an user control, just add the presenter class full name to the user control declaration:

<uc1:MvpLoginForm ID="MvpLoginForm1" runat="server" PresenterId="NMvp.TestModel.Login.LoginFormPresenter, NMvp.TestModel" />

Those are the main features. More details will be loaded here in the wiki at a later time.

Last edited Aug 26, 2007 at 5:25 AM by Heynemann, version 4


No comments yet.