Intranet Process, Planning & Development

Written by Jeffrey Haas and excerpted from the book Practical Intranet Development

File and Directory Naming conventions

Part of creating an intelligent architecture in the beginning of a development cycle is adopting good file and directory naming conventions. This was briefly discussed above in regards to the following structure:

    /index.cfm
    /images/
    /includes/css/global.css
    /includes/css/format.css
    /includes/js/rollover.css
    /includes/templates/template-top.inc
    /includes/templates/template-bottom.inc

This directory and file structure implies some things that need to be clearly stated. These are:

  • File and directory names should contain all lower-case letters
  • File and directory names cannot contain any spaces or special characters (?, %, #, @, etc.)
  • File and directory names should be brief and not overly descriptive
  • Files and directories should be organized into subdirectories that reflect the structure of your site as well as your business. Some dynamic CMS systems will render this point redundant, but others will require defining directory paths. Be smart about that.
  • Sub-groupings of elements should be placed in appropriate sub-directories to keep the file structure on the web-server well-organized.

Also worth noting is that a well-organized file system allows for the creation of image, script, CSS and object libraries that can be referenced and used by multiple developers. Rather than embedding JavaScript and other miscellaneous files into individual pages, they can be referenced by HTML from common directories. This allows the files to be cached by your Intranet users' web browsers (they are loaded from the server only once instead of multiple times) and this, in turn, results in: a) an easing of the load on your web server; and b) faster page load times for your users.