Thursday, February 25, 2010

ASP.NET MVC2 – Adventures of the plain old beginner. Part 1 – Structuring the project.

Theoretical preparation is over! It’s time to get hands dirty with ASP.NET MVC2 and Silverlight 3. Having read “ASP.NET in Action” and “Pro Silverlight 3” here is naive me starting with real work to be done.


Visual Studio 2010 RC, Silverlight 3, ASP.NET MVC2 RC (installed alongside with vs2010rc). Mercurial source control with vs2010 integration. Gallio, MbUnit, WatiN from the testing side.

Structuring the solution.

My thoughts on the project structure would be to include Areas and I wish I could split controllers in separate projects from views.

Area controllers to be in a separate project from views.

Quite fails, and not able to find any guidance by googling. – Giving up, not a priority right now for me.

Multi-project areas.
Fails again. MS gave up on this feature as part of a core product for MVC2 ( There is a link provided for the custom build task required, but it points to the no-release image

As I’ve found no single evidence of this to work, I’m giving it up, not in my principal scope right now.

Default Area.

After fallback to the single project areas I wanted to split into 2 areas at least: Admin and View. What I wanted as well would be getting into /View/Home/Index for the / url by simple setting of routing and without some redirect from the /Home/Index. Within 10 minutes planned I was not able to figure it out and leaving for a later time.


images Out of 3 things I wanted from my solution structure none was really feasible. My wow feeling on MS MVC faded down a bit. VS2010rc crashing down up to 5 times during a day (with intellisense crash patch installed) added a bit to the sad experience.

Hopefully DI will help me to have a re-match on a 0:3 score from today, but this is planned for further iterations. Lets see.


Will be moving forward with test tools setup and putting some lame tests in place first to get a feeling of unit and integration tests with Gallio, WatiN and MbUnit.

Platform and tools: Windows 7, VS2010RC, ASP.NET MVC2 RC, Gallio, MbUnit, NUnit, Moq, Silverlight 3.0

Post a Comment