Note that there are some explanatory texts on larger screens.

plurals
  1. POThe Ultimate Visual Studio Solution Structure
    primarykey
    data
    text
    <p>Realizing that this could be subjective based on the project at hand, I'm looking for the "best practice" method of structuring a VS (Visual Studio) Solution.</p> <p>Please feel free to edit this, comment on what you think might be incorrect, suggest alternatives, etc. I'd love to see this Community Wiki grow into a great resource for people just starting with VS Solutions.</p> <p>Below is what I have working for me now (on my current project), however I know for a fact that there is some stuff in the wrong place. <em>In my scenario, I'm building a <strong>Web Application</strong> using <strong>MVC 2</em></strong></p> <p>Please post your idea of the ultimate solution structure so that we can get an idea of the "best way" / "best practice" (<em>whatever that means exactly</em>)</p> <p><strong>IE:</strong><br> How do you break up your DAL (Data-Access-Layer) / BLL (Business-Logic-Layer)?<br> Do you put your repository layer and service layer inside your BLL? If you're using MVC (Model-View-Controller), do you keep your controllers in the UI instead of the Core?<br> Do you throw lots of stuff in your Utility/Miscellaneous folders, or do you break it apart even further?<br> etc...</p> <hr> <blockquote> <ul> <li><strong>MySolution</strong> <ul> <li><strong>MySolution.Core</strong> <ul> <li><strong>Authentication</strong> <ul> <li><em>this is where I have a POCO and a method to searialize the poco into the userData secion of the auth cookie</em></li> </ul></li> <li><strong>Base</strong> <ul> <li><em>here is where I keep my BaseController and by BaseGlobal</em></li> </ul></li> <li><strong>Controllers</strong> <ul> <li><em>all of my controllers (obviously)</em></li> </ul></li> <li><strong>Domain</strong> <ul> <li><strong>DatabaseModels</strong> <ul> <li><em>contains my L2S .dbml file</em></li> </ul></li> <li><strong>JsonModels</strong> <ul> <li><em>models used to pass JSON objects to the veiw</em></li> </ul></li> <li><strong>Repositories</strong></li> <li><strong>Services</strong></li> <li><strong>ViewModels</strong></li> </ul></li> <li><strong>Extensions</strong> <ul> <li><em>all extension methods</em></li> </ul></li> <li><strong>Filters</strong> <ul> <li><em>Action Filters</em> </li> </ul></li> <li><strong>Utilities</strong> <ul> <li><strong>Apis</strong> <ul> <li><em>all third party API code goes in here</em></li> </ul></li> <li><strong>Badges</strong> <ul> <li><em>badge calculation goes here</em></li> </ul></li> <li><strong>MailClient</strong> <ul> <li><em>send plain text or html email using the classes in here</em></li> </ul></li> <li><strong>RoutingHelpers</strong> <ul> <li><em>contains a class to enable lowercase routes</em></li> </ul></li> <li><em>also contains things that I don't know where else to put... IE: HTMLSanitizer, custom HtmlHelpers,UserInfo helper (IP address, browser, etc), DataConverter, etc</em> </li> </ul></li> </ul></li> <li><strong>MySolution.UI</strong> <ul> <li><strong>App_Browsers</strong> </li> <li><strong>Assets</strong> <ul> <li><strong>Css</strong> </li> <li><strong>Images</strong> </li> <li><strong>Scripts</strong> </li> </ul></li> <li><strong>Views</strong></li> <li><strong>Global.asax</strong> - <em>inherits from BaseGlobal</em></li> <li><strong>Web.config</strong></li> </ul></li> </ul></li> </ul> </blockquote> <hr> <p><strong>Screen Shots</strong><br> <img src="https://i.stack.imgur.com/y34gc.png" alt="Core"><img src="https://i.stack.imgur.com/t8uMn.png" alt="UI"></p> <p>Please feel free to comment accordingly, or better yet, post your own version (answer) below. I know that what I've got isn't the best way. </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