How do you structure ASP.net sources in Visual Studio?

Do you have one solution with a web application project, class libraries, a project and database tests? Or do you divide it into several solutions? Why?

I ask because we are trying to optimize this script for Visual Studio 2010, and I would like to receive information from the community about how you prefer to work.

+4
source share
3 answers

I try (but not always) to have one solution per task, but I import projects of existing projects from other solutions, such as my WebControlLibrary, where I store common user controls and classes, etc.

My actual work solution, which I then incline towards the web application, business logic, data access level and entity level, i.e.

Solution ...MyCompany.WebControlLibrary ...Project ...Project.BusinessLogic ...Project.DataAccess ...Project.Entities ...Project.Scripts ...Project.Testing ...Project.Deployment 

If a project requires something like a mobile device, I will always use it in a new solution, but maybe he can share some projects of the current solution, i.e.

 MobileSolution ...MobileProject ...Project.Entities ...MobileProject.BusinessLogic 

The more β€œthings” you combine, the slower Visual Studios becomes during construction. You can obviously stop certain default projects, but when you need to start creating your own build configurations. If you are going to create large applications, I would suggest splitting into several solutions. It's much easier for me to switch between solutions that save changes to build configurations.

Another option is that when creating projects you can refer to your DLLs. I prefer to import the specified projects into my solution, since you never have to worry about links to creating the assembly configuration, that is, choosing a DLL from the Debug or Release folder.

+3
source

Standalone libraries may be their own solutions. Links to these libraries can be included in the project you are working with. Related items, such as a web application, test settings, and specific libraries, such as data access or business rules, can be configured as projects within a single solution. It really all comes down to how much you want to break things up for accessibility.

0
source

It depends a little on the work being done by the project.

For ease of use, simply have a solution that simply contains all the necessary projects. If this is a big decision, it may stop you later, when the IDE starts to slow down and the time it takes to build the rocket through the roof.

Let's say one of the projects is a library used by your company to make card payments and interact with 3d security. You imagine that you have a GUI page to get detailed information, etc.

If you had many sites that all accept card payments, you would greatly benefit if this project was in a separate solution and referenced a compiled dll. Any changes that you require, you will need to open the solution, make changes, build it, go to the solution in which you work, and test it. It sounds like pita bread, and you find it just easier to have it all in one big solution. But then, if you have this library in each solution and make general changes to it, you need to repeat this change.

So, you just need to make a decision that you are developing a separate project in the same solution or something that can be used elsewhere. If you need more functionality than a library, you can implement a partial class in your project and extend the library this way. Or maybe a wrapper class would be sufficient. But then you know that you do not affect other sites that use this library, and you keep your solution more compact and manageable with less memory during development.

0
source

All Articles