Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET MVC - Solution Layout Suggestions
    primarykey
    data
    text
    <p>I have been working with ASP.NET MVC for a couple of months now and I'm still not happy with the layout of my project's solution. I am trying to construct a mid-sized website CMS that is as portable and reusable as possible and there are some obvious problems in the design of it. I am looking for some advice regarding how I should structure my solution in consideration of separation of concerns. I've found <a href="https://stackoverflow.com/questions/832497/asp-net-mvc-solution-organization">a similar question here</a>, but it doesn't really target some of the issues I am facing.</p> <p>Right now this is how my solution is laid out:</p> <pre> +Project.Controllers - All Controller classes P+roject.Controllers.Tests +Project.Core - Utility classes including repetitive tasks and some configuration handlers (this project needs to be better fleshed out) +Project.Core.Tests +Project.Models - Model classes, Entity Framework context, and Repository classes +Project.Models.Tests +Project.Web - All Views and Content </pre> <p>One major thing I am currently missing is a place to stick my business logic and I feel I've been wrongly placing business logic in my repository classes as well as intermingling it in controller actions. Obviously, I'm very aware of this problem, I'm just not sure where I should placing my business logic in that solution layout. Does my solution structure need to change or can I safely keep that business logic in my Models project? Also, I really don't like that my EF Context is in the Models class, but I don't know of a way to isolate the data layer code from the Entity Classes needed in my model.</p> <p>How is everyone else laying out their production ASP.NET MVC solutions?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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