Polling & Feedback

Daniel M. Frommelt

University of Wisconsin - Platteville

Polling & Feedback

HighEdWebDev 2006



Presentation and documentation are online @

http://www.uwplatt.edu/web/presentations

Overview

Polling

  • Reasons for Polling
  • Development Goals & Logic
  • Code Review (XML & XHTML)
  • Documentation & Testing

Feedback

  • Reasons for Feedback
  • Development Goals & Logic
  • Code Review (XML, XSL, CSS, Perl, PHP)
  • Data Interpretation

Polling

Why polling?

  • Lots of 'chatter' about polling
  • Departments had a desire to interact with users
  • It's a new 'shiny object'

Why didn't I want polling?

  • No scientific value because no verification (single vote)
  • Not a mission critical priority
  • It was just 'fluff' in my mind

We made it anyway to settle the natives, and to try something fun.

I used a new student on this project to break them in.

Polling Development Goals

Though we agreed to develop this, we didn't want to maintain this over the long run.

  • Empower the departments to make the polls
  • Results are gathered by the departments
  • Flexible to accomodate numerous polls
  • Simple for the end user

Polling Development Logic

With the goals in mind, we needed to find 'A' solution.

  • Empower departments make the questions and options
  • Results can be viewed immediately
  • Flexible so numerous polls can happen at once
  • Simple setup so non-tech users can do it

Polling Logic

Logic for the polling is very simple.

  1. Setup scripts on server
  2. Create XML file from sample file
  3. Include two lines of code in the XHTML
  4. Visitors use poll and view results
  5. Multiple polls can occur

Polling Script Setup

The development server environment at UW-Platteville uses Perl.

The zipped files are available at the presentation URL.

We have two versions of the code available: Perl and PHP.

Polling Script Logic

  1. Page is rendered and a JavaScript launches
  2. JavaScript looks for XML file
  3. JavaScript renders form based on XML (AJAX)
  4. The user submits a poll
  5. Perl (PHP) gets the submision and reads in the XML
  6. Perl (PHP) updates the XML on the server
  7. The results are forced back to the browser (AJAX)

Polling XML File

<?xml version='1.0'?>
<!DOCTYPE poll SYSTEM 
'http://www.uwplatt.edu/template_data/polling/poll.dtd'>
<poll>
  <question>PLACE YOUR QUESTION HERE</question>
  <option>
    <value>PLACE YOUR FIRST CHOICE HERE</value>
    <votes>0</votes>
  </option>
  <option>
    <value>PLACE YOUR SECOND CHOICE HERE</value>
    <votes>0</votes>
  </option>
  ...
</poll>

Polling Documentation

The documentation for the polling has to be as simple as the poll itself.

The documentation is online at: http://www.uwplatt.edu/web/wtc/poll.html

Polling Options

There are some decisions that were made along the way. They affect how our polling works.

  • Use XML as our storage medium (it's simple and flexible)
  • There will only be one poll question per XML file
  • A cookie is set when users have 'voted'
  • A user can 'view results' without voting
  • Users can vote multiple times

Polling Examples

Polling Questions?

???

Why Feedback?

I had a very negative experience with the last update to the University's website.

  • Released new main page in November 2005
  • TWO emails were sent to the Chancellor complaining
  • I was told in late December 2005 to rebuild the site

Why didn't I want Feedback?

It is painful enough to design a web site by committee. I didn't want to extend that pain.

  • Imagine the Mona Lisa being desinged by committee
  • Designing a website is a lot like art
  • No matter what is designed, someone is unhappy

Feedback Development Goals

Though we agreed to develop this, we didn't want to maintain this over the long run.

  • Empower the users to make the feelings known
  • Results are gathered by the Web Office
  • Flexible to accumulate data on multiple pages
  • Simple for the end user

Feedback Development Logic

With the goals in mind, we needed to find 'A' solution.

  • Empower the Web Office to have data to back up our decisions
  • Results can be viewed immediately
  • Flexible to gather data from multiple pages
  • Simple and unobtrusive for users

Feedback Script Setup

The development server environment at UW-Platteville uses Perl.

The zipped files are available at the presentation URL.

We have two versions of the code available: Perl and PHP.

Feedback Script Logic

  • Page is rendered and a JavaScript launches
  • User clicks "Feedback" and form opens (AJAX)
  • User submits opinion
  • Perl (PHP) gets the submission and reads in the XML
  • Perl (PHP) updates the XML on the server
  • Webmaster grabs XML file
  • XML file is viewed with XSL

Feedback Options

The decisions made in the Feedback affect the data collected.

  • Anonymous data is submitted
  • Besides the user submitted information, the following was collected:
    • Date/time stamp
    • Operating System information
    • User Agent information (version)
  • A 'potty mouth' filter was added to the "Notes" field.
  • Turned off viewing of the XML on the server

Feedback XML File

<?xml version='1.0'?>
<!DOCTYPE poll SYSTEM 'feedBack.dtd'>
<feedback department=''>
   <file>
      <name>contact.html</name>
      <hate>0</hate>
      <dislike>1</dislike>
      <like>1</like>
      <love>0</love>
      <comments>
         <note datestamp='7/27/2006' os='WinXP' browser='MSIE' 
         version='6.0'>Hi there! I like this.</note>
      </comments>
   </file>
</feedback>

Feedback DTD File

<!ELEMENT feedback (file+)>
<!ATTLIST feedback department CDATA #IMPLIED>
<!ELEMENT file (name, hate, dislike, like, love, comments)>
<!ELEMENT name (#CDATA)>
<!ELEMENT hate (#CDATA)>
<!ELEMENT dislike (#CDATA)>
<!ELEMENT like (#CDATA)>
<!ELEMENT love (#CDATA)>
<!ELEMENT comments (note*)>
<!ELEMENT note (#CDATA)>
<!ATTLIST note datestamp CDATA #IMPLIED>
<!ATTLIST note os CDATA #IMPLIED>
<!ATTLIST note browser CDATA #IMPLIED>
<!ATTLIST note version CDATA #IMPLIED>

<!ELEMENT feedback (file+)>
<!ATTLIST feedback deptartment CDATA #IMPLIED>

Feedback Results

Feedback XSL File - Graph

<xsl:template match="feedback">
<xsl:for-each select="file">
<dl>
<xsl:variable name="total" select="hate + dislike + like + love" />
<xsl:variable name="hate" select="hate" />
<xsl:variable name="dislike" select="dislike" />
<xsl:variable name="like" select="like" />
<xsl:variable name="love" select="love" />
	<dt>Hate</dt>
	<dd style="width:{($hate div $total)*100}%">
	   <span><xsl:value-of select="hate" /></span>
	</dd>
...
</dd>
</dl>

Feedback XSL File - Notes

<xsl:template match="feedback">
<xsl:for-each select="file">
<ul class="notes">
<xsl:for-each select="comments/note">
	<li>
	   [ <strong> <xsl:value-of select="@datestamp" /> </strong> ]
	   <img src="{@os}.gif" alt="{@os}" />
	   <img src="{@browser}.gif" alt="{@browser} {@version}" />
	   <sup> <xsl:value-of select="@version" /> </sup>
	   <xsl:value-of select="." />
	</li>
</xsl:for-each>
</ul>

Feedback Examples

The use of AJAX helps make the Feedback form more user friendly and unobtrusive.

The results are restricted so it can not be viewed online. We had too many users playing with the feedback form, adding junk data. Results can be viewed offline only.

Feedback Questions?

???

Polling & Feedback



Presentation and documentation are online @

http://www.uwplatt.edu/web/presentations


Email: frommelt@uwplatt.edu

Copyright Information

Copyright Daniel M. Frommelt, 2006. This work is the intellectual property of the author. Permission is granted for this material to be shared for non-commercial, educational purposes, provided that this copyright statement appears on the reproduced materials and notice is given that the copying is by permission of the author. To disseminate otherwise or to republish requires written permission from the author.