During the saga of getting Print from My PC working, I had to build some pages to help people set the whole thing up. Predictably, this included clobbering some HTML and CSS around (and for the record, I still hate ASP with a burning passion).
Online Services already has an online ‘look’ which is visible on the Gateway, which seems to be used wherever possible. The trouble is, the entire layout and design is based on some very old HTML and CSS (and an inexplicable reliance on JavaScript, which I’ll ignore for now). Each individual subset of the online services provided by the University has a subtly different stylesheet and a different way of doing things, so for Print for My PC I decided to mostly scrap the existing code and start from scratch.
The result is visually almost identical, although in a few places it sports crisper lines and cleaner finishes. However, behind the scenes the CSS is smaller, faster, slicker, more standards compliant, provides better support for assistive technologies, makes greater use of flexible positioning and so on. There’s a ‘standard’ stylesheet to provide the unified look, and then an individual ‘tweaks’ stylesheet for some PFMPC specific colour adjustments. Finally, PFMPC makes use of some common JavaScript scripts to handle the nice lightbox effect for popup images.
Why am I blogging about this? Well, firstly this is a blog which in part aims to let you look behind the scenes at what’s happening. Secondly and most importantly, however, the code is specifically designed to be incredibly portable between various services. I envision there being yet another subdomain (sorry!) such as common.lincoln.ac.uk, which exists purely to store objects shared by all services. The stylesheets, the images, the scripts. The result once properly implemented would be ultimately beneficial – it would improve caching, reducing hits to services. It would enforce consistent appearance. Applying a code or styling fix would need to be done once and would be replicated to all services using it. Finally and most importantly, it would get people into the mindset of “data should only exist once” which is a key part of the Web 2.0 way.
Still, mindless code changes for such a minor improvement would be senseless. Which is why I’m going to suggest the following: create common.lincoln.ac.uk, add the resources to it, and when new services are created or services are updated make them use the common resources. It’ll be slow, but it’ll be worth it.
Nice idea, but common.lincoln.ac.uk is very close to http://commons.lincoln.ac.uk which is already in use. Maybe not a big deal, but thought I should flag it up.
Yeah, common.lincoln was just throwing one out there. Perhaps shared.lincoln or even just c.lincoln to save those precious bytes.