I am just getting started with ASP.NET, using Visual Studio .NET 2002 in C#.
For previous Web applications, developed using VB webclasses, the application was comprised of numerous DLLs (corresponding to numerous VB projects), each handling a different aspect of the application -- one for administrative functions, one for reporting, etc.
This meant that the Web application lent itself to being worked on by multiple developers, as long as each one worked on a separate VB project. The various DLLs were copied independently to the Web server as and when necessary. This also avoided having one monster DLL.
Visual Studio .NET has me a little floored here, as it automatically creates the folder on the Web server (local in my case, for testing) and everything goes into that folder.
I do not want to end up with a massive DLL, and would prefer to break the application up into smaller projects/DLLs. This would also make it easier to allocate different parts of the application to different developers.
However, it seems that if I create a new ASP.NET Web application, I need to have a separate web folder/site for it. This is not ideal, although I imagine I could copy all the files into the original folder and add the DLL to the original bin folder, but this (naming conflicts aside) is a rather messy approach. Can I use a subfolder of the original, without getting IIS in a mess?
There must be an accepted, recommended, best approach here to develop a large ASP.NET Web application as a group of smaller ASP.NET applications, but what is it?
Thank you for your time.
You can break up the functionality as you would have with VB. The end result should be one Web application with several class library DLLs. To manage inter-project dependencies, it will be best to create a single Visual Studio Solution. Start with a Web Application project, then add new class library projects to that solution as you see fit.
Once you have a solution that contains the Web application, you can add new class library projects by selecting the Solution node in the Solution Explorer tree; right click and select "Add New Project..." When you see the choices of projects to create, select "Visual C#" in the Project Types window and select "Class Library" in the Templates window. The set of class libraries you create can then be used in your Web application by referencing their projects. You will likely need to change the output directory on each project to get them all to be built into the Web application's virtual directory.
You may want the binaries to go into a subdirectory, or better yet, strongly name them and put them in the Global Assembly Cache.
Dig Deeper on Win Development Resources
Related Q&A from Berni McCoy
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.