About the author
I began the design of my web site with a few goals. They are as follows:
The main page and contact us link came up pretty quick.
The navigation header started as
Home | About Us | Contact Us
And the copyright link at the bottom was written like so:
Copyright © 2010 Journeyman Consultancy & Services, All Rights Reserved.
And then I took a breather. Subsequently, I added Chinese to the site, so it became
Home | About Us | Contact Us | 中文 | English
The "About Us" wasn't linked to any page. And I separated the phrases used into English, and Chinese. The "中文 | English" links passed the query parameter /?hl=zh and /?hl=en depending on whether the former or the latter was selected. And so, depending on whether the Chinese, or English link was clicked, the appropriate language would be displayed accordingly.
When I added the "About Us" page, I decided that that the copyright and the navigation header had to become reusable components, so I wouldn't have to add that at the bottom of the page. In addition, when those became reusable components, a change I made in the component itself would propagate to wherever it was used, instead of having me make changes to every page.
So, the copyright became a user control like so, in the JourneymanCopyright.ascx file:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="JourneymanCopyright.ascx.cs" Inherits="JourneymanWeb.SiteControls.JourneymanCopyright" %><asp:Literal ID="Copyright1" runat="server" Text="<%$Resources:Copyright%>" /> © 2010-2011 <asp:Literal ID="Literal14" runat="server" Text="<%$Resources:JourneymanConsultancyAndServices%>" />,<asp:Literal ID="Reserved1" runat="server" Text="<%$Resources:AllRightsReserved%>" />.<br />
And in the pages where I needed the Copyright to be shown, I just had to include a one-time only reference at the top of the file, like so:
<%@ Register TagPrefix="JourneymanFooter" TagName="Copyright" Src="~/JourneymanCopyright.ascx" %>
And where I needed the content to be shown, I included the following in its place:
<JourneymanFooter:Copyright ID="Copyright1" runat="server" />
The navigation header was given similar treatment, and translated into a user control as well. Its usage is similar as well.
And that's how I designed the Journeyman web site.
References: The design and implementation of a searchable localized web site
How to free more space on your home drive by redirecting the location for SDKs in RAD Studio
Learn the command line used to compile System.pas in Delphi
A method to design records so that they're allocated on a specific byte boundary, such as 16 bytes, 512 bytes, 4096 bytes, etc.
Learn why the map is cool in Go!