Some website architecture

GeoffW
PlatinumLounger
Posts: 4023
Joined: 24 Jan 2010, 07:23

Some website architecture

Post by GeoffW »

Hi

I thought I'd share this- as I have had very little contact with the way websites are developed, and so I've come up with my own. I'd be interested to know how other sites manage the look and feel, and updating.

My website is www-belconnen-subs.com.au

My aim in writing the code was to make something which was quick and easy to add new pages, and also Q & E to change the look and feel of the whole site. I didn't want to have scripts which operated on a whole heap of html pages.

I chose to use ASP as I was comfortable with the technology, and I didn't want to go to great lengths to learn a new language. (I have touched ASP.NET but did not have any .Net development tools).

I started by coding all the pages using client side javascript, but had some feedback that there were some people viewing who did not have any sort of javascript available, so I changed it all over to server side.

Here's the source code for one page:

Code: Select all

<html lang="en">
<head>
<title>Subway Belconnen- The Signboard</title>
<LINK REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen>
<%@ language="javascript"%>
<!--#include file="showpic.txt"-->
<%
var index;
var pictureList = new Array( 
'24hr Chinese',
'Abbreviation',
'Accountant',
'Acronyms',
'Advice',
'Alarm Clock',
'Alarm Clocks',
'Alcohol',
'Alimony',
'Ambiguity',
'Ambivalent',
'Amnesia',
'Amnesia 2',
'Apple',
'April fools',
'Archery',
'Are you wise',
'Army Dentists'
);
writeMeta("Signboard Page 1");
writePicList(pictureList);
%>
<script src="showpic.js"></script>
</head>
<body background="bglogo.gif" onload="showPicture(0);">
<%
writeNavigation("Signboard");
writeBoardLinks(1);
writeAllPics();
%>
</body>
</html>
The include file contains all my javascript source.

pictureList is an array of all the photos showing on the page.

writeNavigation shows the top part of the navigation. In this case, the "Signboard" link will not be an active link.

writeBoardLinks writes the links for the 70+ pages which have signboards. The "1" indicates that the "1" link will not be active.

writeAllPics displayes the pictures.


So if I change anything in the way the website is displayed, I only have to change in one place.

The longest part about creating a new page is creating named pictures. I could have just numbered them, but naming helps me to sort them out, and it helps a little to know if I've posted the same one twice.

So I've created a site which, despite having a lot of pages, is extremely easy to maintain.

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15498
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Some website architecture

Post by ChrisGreaves »

GeoffW wrote:... other sites manage the look and feel, and updating. ... So I've created a site which, despite having a lot of pages, is extremely easy to maintain.
I decided to write my own compiler, WbWrd, and if only I knew how to properly write a style-sheet Id be happy.
WbWrd takes a regular Word document and crawls along every hyperlink, testing the date-last-modified of the Word document against the HTML version. If the DOC has a later date, the DOC is compiled and FTPd to the site. Images likewise.
The main time-saving for me lies in my being able to take a 30-second diversion while on one job, make a quick edit to a word web page, save and close it, and be back on the job without losing my train of thought.
The next time WbWrd crawls that tree, it detects an updated DOC version and does its thing.
P.S. I just checked - I have 957 HTM files in my web folder, representing 957 Word documents, grouped in 49 folders; each folder can be considered a mini-site.
Sitemap I was getting along quite fine until late this afternoon when Leif "I drew the short straw" emailed me.
An expensive day out: Wallet and Grimace

User avatar
Jan Karel Pieterse
Microsoft MVP
Posts: 656
Joined: 24 Jan 2010, 17:51
Status: Microsoft MVP
Location: Weert, The Netherlands

Re: Some website architecture

Post by Jan Karel Pieterse »

I built my site using Expression Web 2. EW is great with CSS adn very good in producing html code that adheres to the web standards.
The navigation is driven by an xml file and some classic VBScript I wrote myself.
Regards,

Jan Karel Pieterse
Excel MVP jkp-ads.com

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Re: Some website architecture

Post by agibsonsw »

Jan Karel Pieterse wrote:I built my site using Expression Web 2. EW is great with CSS adn very good in producing html code that adheres to the web standards.
The navigation is driven by an xml file and some classic VBScript I wrote myself.
Hello. I'm interested in the fact that your 'navigation is driven by an XML file'. Could you elaborate a little. How would an XML file be incorporated into a CSS/HTML website?
Thanks, Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.