Hi,This page was written by Jeremy Nelson. I wrote most of the Showcase web site, and I thought it might be useful if I outlined some of the methods I used to assemble the site and some of the reasons I constructed the site the way I did. This section should be considered opinion, which is why I decided to write it in the first person.
What we were trying to do
With the showcase we wanted to give you some simple examples of what you can do with NetPresenz. By giving you examples to work from you can make better use of NetPresenz, you can more easily create a rich web site and, importantly for us, you will need to ask us fewer questions.We had a couple of constraints:
Size is not usually a problem if the web site is mostly text: text takes up very small amounts of space compared to graphics. Graphics sizes were minimized (the graphics for the web site take up less than 100K) to reduce space and also to make sure that the web site downloads reasonably quickly.
- The showcase couldn't be too big
- The showcase had to be complete
- The showcase had to be technically correct
It is hard to be complete when you are talking about the web. The web is growing rapidly and there are a wealth of technologies and a broad scope for creativity. But we have tried to provide a basic introduction which gives you some idea of the possibilities.
Making the showcase technically correct is non-trivial. I have tried to make the showcase non-browser dependant, I've run the showcase through WebLint and I've tried to follow good practise in formatting the documents. Nonetheless links will fall out of date, I have some Netscape specific tags (which also work on MIE) and the site is an odd mix of absolute and relative paths.
The Netsape specific tags I've used are not crucial, and the web pages should degrade gracefully under other browsers. The pages display correctly in Lynx (a Unix web browser).
There was one final constraint which explains why the site is a mix of absolute and relative paths:
- The user shouldn't have to be using NetPresenz to view the web pages
Absolute vs Relative Links
If the user is viewing the web pages through NetPresenz then there is a Root directory which you can refer to by specifying your links as:/path/fileNo matter how you move the referring document within that hierarchy the link remains valid.However, if the user opens the web site by dragging the index.html file onto their web browser then these links will fail. Since I could not guarantee that the user was browsing this site from NetPresenz, most of the web pages on this site use relative links. Just dragging the index.html file onto your browser should give you access to most of the site.
The exception is the 'tricky' hierarchy. In the tricky web pages we display some of the cooler features of NetPresenz which require you to be using NetPresenz. Within the tricky hierarchy I exploit all the tricks I can to make my life easier. Most of the pages use Server Side Includes for the header and footer, I exploit absolute paths and 'missing' files.
One neat trick exploits the way NetPresenz searches for a requested file. In the Tricky folder there are two index files: index.html and index.shtml. If the user is reading through the web site without using NetPresenz they will see the contents of the Index.html file when they follow a link to the Tricky directory. However, when they are using NetPresenz they will see the Index.shtml file, since NetPresenz first looks for the index.shtml if you request index.html.
The result is that you never see the Tricky section of the Showcase unless you are running it through NetPresenz. Instead, you see a warning page.
The Tools
Most of the web pages were written in BBEdit. I have never found the automated tools particularly useful, and certainly in this case where I needed close control of how links were used, I think the automated tools would have been counter productive.BBEdit has a number of features I find extremely useful: multi-file search and replace, syntax colouring and BBEdit extensions. Peter created a perl script which encodes plain text into its HTML form which was also very useful.
Perl is our preferred CGI language. I found it a little difficult to understand at first, but not too bad. It is consistent, fast and the CGI interface is well implemented. Apple Script is inconsistent and slow, but universal. Frontier is powerful, but difficult to learn.
I used Adobe Photoshop for most of my graphics. Photoshop is a far more powerful tool than I can really recommend, but we were given a copy and it does everything. Most importantly it will trim the colour palette to a 'web' colour palette: that means that when the graphics come up on a computer screen the screen doesn't redraw as the colours are rearranged. Also, by reducing the number of colours in an image the image can be made smaller.
All the graphics in the showcase are computer graphics, so I've used GIF format. GIF encodes pictures with solid bodies of colour very well, much better than JPEG. If we had had photos with complex varying images I would have used JPEG. Also, the majority of the images are Interlaced GIFs, which means they will 'venetian blind' as they download. Keeping graphics small is one of the best ways to make your site responsive to the user.
Keeping Up Appearances
I tried to make the appearance of the web site consistent. This is important: the flexibility of the web lets you do almost anything, which usually means it is extremely easy to confuse the users of your web site. By providing a consistent appearance the user always knows where they are.One weak point of the Showcase is that the title (what appears as the window title on Macintosh Web browsers) reflects the 'category' of the web page (Setup, HTML, Tricky,..), rather than the actual web page. This is bad since this is the title which appears in most bookmarks, and it does not uniquely identify the web page. I did it this way because the files in the Tricky section use Server Side Includes as headers and footers. It was a trade off between giving you a working example of SSIs, or giving correct titles.
Browsing Disputes
While constructing the Showcase we used Microsoft Internet Explorer 3.0b4. It was stable and reliable. We tested under Netscape 2.0 and 3.0. HTML has all sorts of incompatible tags and we had to fairly conservative to get a similar appearance across different web browsers.A case in point is centering tables. Tables are an elegant and powerful construction which can be used to align and format sections of HTML. It is natural to wish to center a left aligned list, but I believe it is impossible. There are three different ways of centering the table, and all of them produce contrary results in one of the two major browsers (IE vs Netscape). In the end, I gave up.
I recommend testing your site under Lynx if possible. Lynx is a Unix text web browser. Lynx is fast and clean, and rapidly provides a different perspective on your web site. If you still respect your web site under Lynx then you've probably got something there.
Time Like Axis
Creating a web site takes time. Maintaining a web site takes even longer. Be aware that it takes a long time to whip up a little web site and vast amounts of time to create a substantial web site. Web sites are usually very public, so keep this in mind: more people may read your web site than you will ever meet in person. Their whole impression of you may come from your web site. So take the time to do it right.
Home Contents Setup HTML Tricks Misc Feedback