Tuesday, November 22, 2005

Talking about web sites

Today I'm going to talk about website design. I maintain my New Brunswick Railways web site, but I also maintain web sites for the Canadian Railroad Historical Association, the Salem & Hillborough Railroad", and Transport 2000 Atlantic. They're all maintained pretty much the same way.

Under the hood, all web sites use a language called HTML to describe how their pages look. I'm not going to provide a tutorial on HTML here but if you Google for "HTML Tutorial" you'll find fine sites like this or many others. Just understand that the basis of every web site is a bunch of text called HTML.

Many people use a product like Microsoft FrontPage to design their web sites, and that's fine. They provide a word processor-like interface to your web site and allow you to put simple web sites together very quickly. But as a programmer I don't like the HTML they produce and they're not suitable for large web sites.

Believe it or not, I design my web site using the Notepad text editor. It allows me full control over the web site and I know exactly how it is built. It's not for everyone, but it works for me.

I do use some time-saving features, though. My web site provider Pair.com has a feature called server-side includes, which basically means that if a bunch of pages have a portion of the page in common, I can put that in a separate file and use it, rather than writing it over and over again. If you look at, say, my New Brunswick East Coast web pages, you'll see that the header and sidebar on every page is the same. I don't rewrite it every time. It's in a separate file (you can see the header by itself here) and it gets included on every NBEC page. The beauty of that is that if I need to update the header, I change the header file and every NBEC page displays differently.

It's a real time saver.

I'm also starting to use a newer HTML feature called CSS, "Cascading Style Sheets". They're a way of describing how a page should look to the client, that being you. By using one or more standard CSS files across a web site, you can quickly change the entire look of a web site by updating one file, much like I use header files. Not all of my site uses CSS yet, and you'll notice that as you browse, say, the VIA section of my web site. I haven't got to updating that yet. A good CSS resource is here at Glish.com.

My web sites are pretty plain in appearance, and that's for two reasons. I prefer to present information over style, and I'm not a graphic artist. I would appreciate any suggestions you have to improve the appearance of my sites, though - email me at b l o g@theboykos.com. Thanks for reading.

No comments: