Spliting Views and ViewModels into seperate projects.

Topics: Conventions
Sep 22, 2011 at 3:20 AM

Hi All,

Is it possible to split Views and ViewModels into separate projects.

Main reason to do this is to enable testing through an acceptance test framework that bypsses the views.



Sep 22, 2011 at 12:57 PM
Edited Sep 22, 2011 at 12:57 PM

Yes, it is possible. You may need a shared project which is referenced in your views and viewmodels project for some interfaces and you need

to implement the LocateForModelType() (Bootstrapper) method to locate your Views and ViewModels.

Sep 22, 2011 at 2:52 PM

Since they will be in separate assemblies, you will need to add appropriate rules to to the ViewLocater/ViewModelLocater for this to work properly. See Using the Name Transformer wiki page

Sep 22, 2011 at 10:15 PM

Thanks for the quick replies.