WebJavenue logo
webjavenue.com — Java web development made easier without JSP
Demo Tutorial Resources About

RSS Icon
Use the RSS feed to stay current on new additions.

Your First Website In Java: Easier Than You Think

1.1.1. Designing For Popularity: Content

This tutorial is a work in progress: new chapters are published as they become available. The author welcomes readers' input and will greatly appreciate any comments, suggestions or criticism sent to: bruno at webjavenue dot com. In the meantime, please feel free to check out the demo application this tutorial is based upon.

Published: Mar 12, 2006

Content is king, you know that. Content is what people are looking for and the primary reason they come to your website. It is not my job to teach you how to author great, insightful, authentic content — you are probably much better at it than myself, at least in the correct use of English department. What I can do is suggest ways to enhance your readers' experience in finding, viewing and comprehending the gems of wisdom you will be creating for them.

Before people can appreciate your writings, they have to somehow find them in the labyrinths of the Web. Getting the word out is an onerous task that requires a lot of hard work, determination and skill. You can pay someone to do the job, but it will really be to your advantage if you find out for yourself how these things work, and fortunately there are tons of materials out there that can help you get a grip on the subject (for a partial list of such materials see the Promotion and SEO resource page).

As you will find out, a good share of all incoming traffic is generated by search engines. Therefore, if you want more visitors, you will have to learn how to increase your site's visibility in the search engine results pages (SERP), There is actually quite a bit of dark art involved in search engine optimization (SEO), but as far as your website's design is concerned, there are only a handful of elements you can play around with to improve your results:

  1. Text
  2. Title, description and keywords
  3. URL

Here, text is what people actually see in their browsers. There is not much we can do about it design-wise, but I'll mention that it's generally a good idea to:

  • keep your HTML code as lean as possible;
  • put your main content near the top of the file, and
  • use semantically meaningful tags to better structure your code and give more highlight to the important keywords you are betting on.

Title, description and keywords are the meta tags enclosed within the head part of the document (more on this in the HTML Resources section). Meta tags are not directly visible in the browser (except title), but they play an important role in how search engines evaluate the page's relevance in relation to a particular search query. It is therefore imperative that you be able to manipulate the content of these meta tags as you do your SEO work.

URL stands for Uniform Resource Locator and can be thought of as the unique internet address of a document. A URL consists of several parts and generally looks like this (for more information, check out the HTTP section in Resources):

http://host/directory/file

The part on the left identifies your website, and once you've picked a domain name there is not much control over it. Now, let's see what the directory/file name part has to offer.

What's In A Path Name

Your website consists of a number of pages. In the good ol' days all those pages would be organized as files within directories, and thus each page would have a path naturally reflecting its position in the file hierarchy. Since we are building a dynamic website whose content for the main part comes from a database, physical location no longer dictates our choice of a document identification scheme. Speaking of the possible options here, we might just as well resort to flat names (as if every document resided in the root directory), or opt for one of those odd-looking schemes you can see in online catalogs, forums and other dynamic applications, like the one below:

/index.php?category=123&page=15&mode=22&item=54321

Although these are possible, it still makes a lot of sense to stick with a directory-style scheme, for at least three good reasons.

  1. Breaking the content down into sections, as opposed to using a flat scheme, provides a way of managing namespaces and thus helps avoid name conflicts.

    For instance, rather than having to use modifiers of some sort:

    /java1.htm
    /java2.htm

    we could use the same name java.htm prepended with an appropriate path string:

    /computers/languages/java.htm
    /beverages/coffe/java.htm

  2. Having a document's URL reflect its position within the logical structure of the website makes it easier to identify the specific procedures, templates, and data elements that are to be used in generating the resulting page.

  3. A nice URL made up of meaningful elements carries out a lot of additional information as to what kind of resource it represents. This is especially important in situations where the amount of space you get to convey your message is severely limited, such as in the SERPs. To show you the difference, I will transform the clunky URL above into a human-readable form:

    /index.php?category=123&page=15&mode=22&item=54321

    to

    /catalog/electronics/dvd-players/54321.htm

    You'll have to agree that the latter is more informative and more appealing to the eye. What is even more important, a human-readable URL creates immediate trust: it tells the surfer that the page is not yet another pointless collection of automatically-generated stuff, but there is a real person behind it.

There are other benefits to using human-readable URLs, but I think I am already preaching to the choir.

Anything Else?

Well, that's it for now. Let me just reiterate the points made in this section. As far as content management is concerned, we would like for our system to:

  • let us create/edit documents;
  • let us edit the meta tags;
  • produce efficient HTML code;
  • use directory-style path names in document URLs.

In the next section, we will look at the system design features that will help our website develop a community angle.

Last edited: Mar 12, 2006


Copyright © 2006 WebJavenue

bruno at webjavenue dot com