Five tenets of high-quality Web application building

published Mar 04, 2006, last modified Jun 26, 2013

Here are the five most important tenets to keep in mind when building high-quality Web applications. I won't go into standards compliance here, because that topic has already been debated to death, and the conclusions are old news now. Instead, let's review the modern tendencies applied in high-quality Web applications:

An URI is not a file

Deal with it. An URI should represent a resource, and all its alternative representations. Use content negotiation to serve multiple languages or formats of the same resource.

To help you figure this URI mess out, try thinking about URIs as ISBNs or bar codes. You'd be surprised to know that URIs are defined to be very similar to these.

In the same light, try at all costs to create and maintain URIs so they don't change. Use URL rewriting if you absolutely need to change URIs for your pages.

Microcontent is king

Good page titles, headings, anchor texts and other microcontent in your Web application pages are a big usability plus for your readers.

Don't use "link here" or "click here" for links. Don't use "Article" as a page title. Use headings to give structure to your HTML pages.

REST: what changes should be POSTed, what doesn't should be GET

You can classify operations in your Web application in two categories:

  1. Those that perform changes in the information kept in (or managed by) your application
  2. Those that don't perform changes (such as presentation pages, views or reports)

Use POST forms and avoid parameters (related to the operation) in URIs for the first category of operations. Use GET forms and URIs for the second. Here's how and why.

Semantic pages matter

Don't use presentational markup. Avoid use of presentational tags like FONT or CENTER. Most likely, what you're trying to get to stand out is actually a good candidate to become a CSS class or ID. The more you place in your stylesheet, the less your pages will weigh. Plus, maintaining a slick, consistent look, and redesigning your site in the future will be way easier.

In the same light, avoid using TABLEs for lists, horizontal tabs and non-tabular information. Resort to properly styled UL or OL elements.

Learn the existing HTML tags, and what they're supposed to be used for. It would be dumb to create a CSS class named "code" just to find out that there is a perfectly good CODE tag that can be used more directly, and styled through CSS.

Finally, don't just bold text that's supposed to be a title. Use one of the heading elements in HTML (there are six depth levels for you to use, so there won't be any shortage!).

Accessibility is good for your readers (and, surprisingly, you as well)

Whether it's because you want to achieve high rankings in search engines, or because you truly, truly care about people with disabilities, designing an application with accessibility in mind should be extremely important to you.

  1. Use AJAX sparingly and always provide fallback mechanisms for those who don't use JavaScript. AJAX should not replace standard interaction methods, and it should also not be used to break the "one page, one URI" rule (this is exactly why frames are being ruled out).
  2. Lay out pages in an accessible fashion. Usually, content should go first in the HTML.
  3. Add access keys, form labels and other accessibility measures. The first step should be using semantic markup.
  4. Resort to Flash only when content you're presenting is eminently audiovisual.