Greyledge.net
Andy Chase - Hire: Programming, Design, & More

I began using PHP during the summer of 2000, when working at Stan Lee Media. At the time my experience with server-side scripting was limited to PERL, which I had never felt entirely comfortable with. PHP's easy learning curve got me hooked, and its powerful feature set inspired me to learn more.

Since then I've done some professional writing on PHP-related topics, and in addition to programming I've done for companies like Valley Presbyterian Hospital and WebcamNow.com I've released some small PHP software projects of my own.

QuickRss is a PHP class for building RSS files as objects, freeing the developer from the need to generate the XML by hand.

I use QuickRss to automatically generate the RSS news feed for my personal web site. The RSS feed is located at http://andy.greyledge.net/news.rss

QuickRss is released under the GNU Public License, and is available for download at http://andy.greyledge.net/QuickRss/index.php

This is a sample of RSS output generated using QuickRss:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" 
  "http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version="0.91">
  <channel>
    <title>Andy Chase - What's New</title>
    <language>en</language>
    <copyright>2003</copyright>
    <description>Web Developer, Tech Writer, Banjo Player.</description>
    
    <link>http://andy.greyledge.net</link>
    <item>
      <title>"Read" Section Refactored</title>
      <link>http://andy.greyledge.net/portfolio/technical_writing.php
      </link>
      <description>Following the addition of a tech. writing section 
	to the portfolio, the "Read" section has been removed.  
	The same content can now be found at 
	http://andy.greyledge.net/portfolio/technical_writing.php.
	The existing URL, http://andy.greyledge.net/read.php will 
	redirect all future requests with HTTP status 301, so 
	well-behaved search engine spiders should be dropping it 
	from public use before too long.</description>
    </item>
    
    <item>
      <title>Portfolio Updated</title>
      <link>http://andy.greyledge.net/hire.php</link>
      <description>PDF and XHTML versions of the portfolio have been 
	updated to include a Technical Writing section, which will 
	soon be replacing the separate "Read" section of the web site;
	having two separate but closely related sections that serve 
	the same purpose doesn't make much sense..</description>
    </item>
    
    <item>
      <title>New Music: "Oh, Susanna"</title>
      
      <link>http://andy.greyledge.net/listen.php</link>
      <description>"Oh Susanna" is now available in Ogg Vorbis format
	for free download.</description>
    </item>
    
    <item>
      <title>RSS Feed Now Available</title>
      <link>http://andy.greyledge.net/news.rss</link>
      
      <description>An RSS newsfeed containing information about 
	recent site updates is now available at 
	http://andy.greyledge.net/news.rss.</description>
    </item>
    
    <item>
      <title>QuickRss 0.1 Released</title>
      <link>http://andy.greyledge.net/QuickRss</link>
      <description>QuickRss  is a PHP class for building RSS 0.91 
	files as objects (which means you don't have to deal with 
	any XML tags yourself.)</description>    
    </item>
  </channel>
</rss>

VOOT is a simple ('vanilla') PHP class for creating web pages with templates. It supports user-defined HTTP headers, and it is capable of processing PHP contained in rendered templates. This class was written with simplicity and flexibility in mind; templates can take the form of any text-based file, and you can define as many content placeholders as you like in each template. To indicate a placeholder in a template, you just surround a key word with percentage signs.

VOOT is currently used to generate its own information and download page at http://andy.greyledge.net/voot/index.php, as well as my site news page at http://andy.greyledge.net/news.php.

The first step to using VOOT is to come up with a template. A simple HTML template might look like this:

<!-- template.html -->
<html>
  <head>
    <title>%HEAD_TITLE%</title>
  </head>
  <body>
    <h1>%PAGE_TITLE%</h1>
    <div>
      %CONTENT%
    </div>
  </body>
</html>

Three placeholders were defined in the template by surrounding key words with the percent sign: HEAD_TITLE, PAGE_TITLE, and CONTENT. We'll need to keep that in mind when we write the script we want to use our template in:

<?php /* example.php */

/* Step 1: Include the VOOT class definition: */
require_once("Voot.class.php");

/* Step 2: Instantiate a new Voot object with our template: */
$myVoot = new Voot("template.html");

/* Step 3: Set the values for the placeholders in the template: */
$myVoot->setElement("HEAD_TITLE", "Templates are Handy");
$myVoot->setElement("PAGE_TITLE", "Create pages with VOOT!");
$myVoot->setElement("CONTENT", "<p>Why maintain multiple static pages
	    when you can use a single template instead?</p>");

/* Step 4: Render the page: */
$myVoot->render();

?>

When viewed in a browser, the above script would look like this:

The HTML source of the rendered template looks like this:

<!-- template.html -->
<html>
  <head>
    <title>Templates are Handy</title>
  </head>
  <body>
    <h1>Create pages with VOOT!</h1>
    <div>
      <p>Why maintain multiple static pages
	    when you can use a single template instead?</p>
    </div>
  </body>
</html>

This is a very basic example; VOOT also has additional functionality for sending user-defined HTTP headers ahead of the rendered template, saving the rendered template to disk, and executing PHP code embedded in templates.

VOOT is released under the GNU General Public License, and is available for download at http://andy.greyledge.net/voot/index.php.

At Valley Presbyterian Hospital I was responsible for ongoing maintenance of the Intranet as well as the development of new applications.

One of the major uses of the hospital intranet is the organization of the many forms and documents used by the Nursing Staff. Documents are stored Adobe Acrobat PDF format and cataloged for keyword searches by the ht://Dig search engine. Documents are also browseable by category.

The Patient Education Handouts section organizes documents by language, allowing easy access to multiple versions of the same information sheet. Separate links are provided for printing or viewing the documents; 'View' will open the PDF file in a browser window, and 'Print' silently prints the document using the ActivePDF PDFPrint browser plugin; The document goes directly to the printer without opening a new window or requiring the user to click a Print button.

The most complex project I developed at the hospital was a PHP/PostgreSQL system for tracking skill competencies for the nursing staff, to replace the paper system that was in use at the time. For each nursing position in each department there's a list of skills, or "Orientation Tool", that the employee must demonstrate they're capable of performing. As new employees show they can perform their duties, the appropriate skills on each Orientation Tool are digitally signed by a preceptor. Once all of the skills on an Orientation Tool are complete, a nurse from the Education department signs the tool, and finally a Nurse Manager signs the tool to declare that employee officially competent to perform all of the duties required by their job description.

Since some of the same skills may belong to more than one Orientation Tool, and since each employee may be assigned multiple Orientation Tools that might have overlapping skills, the application keeps track of skills separately from Orientation Tools; in this way the employee only needs to demonstrate that they can administer an IV line once, and that competency will automatically show up as completed for that employee in any other positions that require the employee to administer an IV.

The application has several secure menus for the different steps of the process (Nursing staff, Preceptors, Educators, and Nurse Managers) as well as a tool for defining new skills, creating new Orientation Tools, and linking skills to Orientation Tools. In addition to the core system for tracking and storing all of this information, there are a number of scripts that generate reports for the Educators and Nurse Managers, so they can keep track of which employees have tools needing completion, or to aid in scheduling by allowing the Nurse Managers to search for all employees who are competent in a specific position.

This web page was generated from a DocBook XML source document using Saxon. [Printer-friendly Version]

Valid XHTML 1.0!Valid CSS!