I'm pretty new to the whole coding thing (hence the name). I've recently written my first website asp.net 4/Visual Studio etc.
I now want to write some code that can be shared amongst websites (my own only). At first I thought of a pluggable class library solution to store the code centrally, however, it seems a class library does not have certain things like config files to store my configuration,and I began to wonder if a class library is the right choice, or whether another web application would be better suited.
The solution will be code/configuration only with no pages.
So, a couple of questions.
Can a web app be incorporated into another web app?
Is a web app the right way or should I stick with a class library solution?
Is there a checklist I should follow before making such a decision?
Sorry if these questions appear rather basic, but as I said, I've little experience in this area.
Thanks in advance.
I always mix in class libraries with my web applications. I have many class libraries for each web application. Your class libraries will have access to the Web.config file for your web application, you just need to add the System.Configuration
namespace.
I would break our your class libraries into logical pieces. As an example, I have a class library for database access, for third party API access, and another for active directory access. Break your libraries into logical pieces that can be easily reused among your other web applications.