Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here's how we've broken up the project. This ASP.NET MVC is pretty close to being launched and we've learnt a few things along the way. I've given the reasons why each project is separate as well.</p> <p>Project.Models - The M in MVC, this contains all your business classes. If you can manage it (an you really should), there should be no persistence or web service related classes here. You can of course have Interfaces for data access defined in this project. A quick way to check if this project is "clean" of data access is to check if you require references to data access DLLs like NHibernate in this project or not. <em>Reason: Theoretically, you should be able to bundle this project and use these classes anywhere else, even if you switch to a different UI like a console etc.</em></p> <p>Project.Site - This project contains all your JavaScript, CSS, View etc., everything related to the View. <em>Reason: If you have a website designer, you can just give him/her access to this project and have him work away.</em></p> <p>Project.Controllers - The C in MVC, this contains all your controllers as well as your ModelBinders. <em>Reason: Three different projects for Models, Views and Controllers makes harder for leakage of concerns to occur.</em></p> <p>Project.Tests - <em>Keeping all your unit tests in separate projects forces you to test only public interfaces; a good practice for unit tests in my opinion.</em></p> <p>Projects.Services - All web services, persistence related code go here in this project.</p> <p>For now, any Utility classes go into Project.Models, but I think it would be much better to have a separate solution for Utility classes and just import them as references to compiled assemblies where needed.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload