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?
Share
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@importstatements 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, likehttp://shared.whatever.com/css/styles.css.