Category: "HTML / CSS"

What you can do with FireBug

  • Debug javascript
  • Examine the DOM tree
  • Understand the CSS
  • Change the CSS in the browser to see its effect
  • See the layout of the page
  • Determine the dimensions of page elements
  • See the page components and understand the page load process
  • View the HTTP headers
  • Evaluate javascript expressions and commands interactively
  • Use debug write (console.debug) statements to issue debug data
  • Add breakpoints
  • Profile your page

If you use it, all the time, contribute. Ask your employer to support it.

Comments - Etiquette

Comments are added to code to assist the reader in understanding the code. The following guidelines should be observed:

  • Comments should not be written to editorialize or entertain. Sarcasm should not be in comments. Questions can be placed in comments, where necessary, to ensure issues are identified and resolved.
  • Proper grammar and spelling are required. It reduces the opportunties for misunderstanding.
  • Comments, especially in an interpretive environment such as PHP, should be brief. Utilities that strip comments for distribution can eliminate this requirement.
  • Careful coding, with meaningful function and variable names may reduce the need for comments. Overly complex statements should be avoided.
  • Comments should be considered a visible part of the deliverable product and should be of appropriate quality. If it is a professional product, comments should be professional.
  • Comments must be updated to remain current as the code changes.

RIA server filesystem architecture

The /opt directory can be used to store shared components, as follows:

  • /opt/os - All open source components

  • /opt/common - All common scripts, such as form validation for contact us forms, anti-spam code.

    • /antispam

      • /html - (html and javascript) - to assist the user
      • /php - to protect the server
    • /footer - Footer text, specifically the company name and copyright indicator. This ensures it can be changed in one place to update every page on the server.

New accounts could access these components like so:


ln -s /opt/os/dojo 
ln -s /opt/os/Smarty 
ln -s /opt/os/Zend
ln -s /opt/common/html 
ln -s /opt/common/php
ln -s /opt/common/footer

These links allow relative references to the common resources, while providing central sourcing.

unexpand for speed

Editing files often introduces extraneous spaces. The unexpand command will convert the spaces into tabs. This can result in a tremendous reduction in file size, code that is easier to read, and pages which are faster.

unexpand INFILE.php > OUTFILE.php

No More Flat Pages

Building a complex application requires creative use of the page space. At a certain point the page is full, and additional content/options/functionality must be integrated with innovative approaches.

  • Dialog or popup boxes are extremely effective for displaying search results. Integrated carefully into the form functions, it allows a user to review the search results without closing the box
  • Tabbed navigation is good for hierarchical content displays
  • Accordian panes are good for compressing a stack of content into a small area, opening them on refresh is helpful for the user