I am seeking some web architecture advice: I would like to know how to share common files, e.g. stylesheets, amongst web applicaitons that span virtual directories and many developers as opposed to having redundant files within each project? What are some recommendations?
Most source control solutions offer a method of sharing files between seperate projects. SourceGear Vault for instance.
This will allow you to manage your files (be they css, dll, or even images) in a single location and then any project that needs a set of files can link to those common files. The source control will pull them into the project but any time you edit them, it will update them in the common location.
You could create another virtual directory that contained the common/shared files and have the other web apps access them from there.
It's somewhat hard to say, without knowing more about your web application.
Firstly, are you sure that you actually want to do this? One of your "many developers" could change the stylesheet, expecting it to only affect one application, and have it affect others. Things may end up even more messy with you having to create per-application stylesheets that override things in the shared one, etc. I'd consider these sorts of potential side-effects before going ahead with this.
But if you do actually want to do it, just host the stylesheet somewhere and have all the applications reference that location in their <link>
or @import
statements for it. There's no restriction that forces you to use a stylesheet from the same "site". If you want it to look nice, set up its own subdomain or something, like http://shared.whatever.com/css/styles.css
.