<p>When spliting a solution in to logical layers, when is it best to use a separate project over just grouping by a folder?</p>

[{'answer_id': 1640, 'author': 'denny', 'author_id': 27, 'author_profile': 'https://Stackoverflow.com/users/27', 'pm_score': 2, 'selected': False, 'text': '<p>I usually do a project for the GUI a project for the business logic a project for data access and a project for unit tests.</p>\n\n<p>But sometimes it is prudent to have separation based upon services (if you are using a service oriented architecture) Such as Authentication, Sales, etc. </p>\n\n<p>I guess the rule of thumb that I work off of is that if you can see it as a component that has a clear separation of concerns then a different project could be prudent. But I would think that folders versus projects could just be a preference or philosophy.</p>\n\n<p>I personally feel that if reusable code is split into projects it is simpler to use other places than if it is just in folders.</p>\n'}, {'answer_id': 1665, 'author': 'Jarrod Dixon', 'author_id': 3, 'author_profile': 'https://Stackoverflow.com/users/3', 'pm_score': 3, 'selected': False, 'text': "<p>denny wrote:</p>\n\n<blockquote>\n  <p>I personally feel that if reusable code is split into projects it is simpler to use other places than if it is just in folders.</p>\n</blockquote>\n\n<p>I really agree with this - if you can reuse it, it should be in a separate project.  With that said, it's also very difficult to reuse effectively :)</p>\n\n<p>Here at SO, we've tried to be very simple with three projects:</p>\n\n<ul>\n<li>MVC Web project (which does a nice job of separating your layers into folders by default)</li>\n<li>Database project for source control of our DB</li>\n<li>Unit tests against MVC models/controllers</li>\n</ul>\n\n<p>I can't speak for everyone, but I'm happy with how simple we've kept it - really speeds the builds along!</p>\n"}, {'answer_id': 1667, 'author': 'lubos hasko', 'author_id': 275, 'author_profile': 'https://Stackoverflow.com/users/275', 'pm_score': 5, 'selected': True, 'text': "<p>By default, <strong>always just create new folder</strong> within the same project</p>\n\n<ul>\n<li>You will get single assembly (without additional ILMerge gymnastic)</li>\n<li>Easier to obfuscate (because you will have less public types and methods, ideally none at all)</li>\n</ul>\n\n<p>Separating your source code into multiple projects makes only sense if you...</p>\n\n<ul>\n<li>Have some portions of the source code that are part of the project but not deployable by default or at all (unit tests, extra plugins etc.)</li>\n<li>More developers involved and you want to treat their work as consumable black box. (not very recommended)</li>\n<li>If you can clearly separate your project into isolated layers/modules and you want to make sure that they can't cross-consume <strong>internal</strong> members. (also not recommended because you will need to decide which aspect is the most important)</li>\n</ul>\n\n<p>If you think that some portions of your source code could be reusable, still don't create it as a new project. Just wait until you will really want to reuse it in another solution and isolate it out of original project as needed. Programming is not a lego, reusing is usually very difficult and often won't happen as planned.</p>\n"}, {'answer_id': 13741, 'author': 'rjrapson', 'author_id': 1616, 'author_profile': 'https://Stackoverflow.com/users/1616', 'pm_score': 0, 'selected': False, 'text': "<blockquote>\n  <p>Separating your source code into\n  multiple projects makes only sense if\n  you... \n  ... More developers involved\n  and you want to treat their work as\n  consumable black box. (not very\n  recommended)  ...</p>\n</blockquote>\n\n<p>Why isn't this recommended?  I've found it a very useful way to manage an application with several devs working on different portions.  Makes checkins much easier, mainly by virtually eliminating merges.  Very rarely will two devs have to work on the same project at the same time.</p>\n"}, {'answer_id': 13755, 'author': 'Jon Galloway', 'author_id': 5, 'author_profile': 'https://Stackoverflow.com/users/5', 'pm_score': 3, 'selected': False, 'text': "<p>Separating features into projects is often a YAGNI architecture optimization. How often have you reused those separate projects, really? If it's not a frequent occurrence, you're complicating your development, build, deployment, and maintenance for theoretical reuse.</p>\n\n<p>I much prefer separating into folders (using appropriate namespaces) and refactoring to separate projects when you've got a real-life reuse use case.</p>\n"}, {'answer_id': 55371, 'author': 'Oskar', 'author_id': 5472, 'author_profile': 'https://Stackoverflow.com/users/5472', 'pm_score': 0, 'selected': False, 'text': "<p>If you do go for creating several projects, make sure everyone who adds code to the solution is fully aware of the intention of them and do everything you can to get them to understand the dependencies between the projects. If you have ever tried to sort out the mess when someone has gone and added references that shouldn't have been there and got away with it for weeks you will understand this point</p>\n"}, {'answer_id': 68009, 'author': 'user10479', 'author_id': 10479, 'author_profile': 'https://Stackoverflow.com/users/10479', 'pm_score': 1, 'selected': False, 'text': '<p>I really think it is better to split the project as well, but it all depends on the size of the project and the number of people working on it. </p>\n\n<p>For larger projects, I have a projects for  </p>\n\n<ul>\n<li>data access (models)  </li>\n<li>services  </li>\n<li>front end  </li>\n<li>tests  </li>\n</ul>\n\n<p>I got the model from Rob Connery and his storefront application... seems to work really well. </p>\n\n<p><a href="http://wekeroad.com/categories/mvc-storefront" rel="nofollow noreferrer">mvc-storefront</a></p>\n'}]
['https://Stackoverflow.com/questions/1623', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/230/']