Download Technique

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

URL redirection wikipedia , lookup

Transcript
ATI techniques overview
1
An Overview of Major Techniques of Web-Based Research
Michael H. Birnbaum
Decision Research Center, Fullerton
This chapter presents a summary of major techniques and methods useful to Web-based research.
The most basic method for formatting, organizing, and linking information on the Web is
called Hyper Text Markup Language (HTML). This language contains instructions (commands)
called “tags” that tell the client’s browser how to display information contained in files stored on
the server(s). If you are planning to do research via the WWW, you need to learn basic HTML.
There are many free tutorials on the Web that teach HTML, there are also reference guides that
contain lists of tags and basic information on how to use them. There are also many inexpensive
books that you can use to teach yourself HTML. My book, “Introduction to Behavioral Research
on the Internet” (Birnbaum, 2001) contains three brief chapters that teach you the basics that you
will need to do research via the Internet.
HTML files are simple text files. These files can be created in a simple text editor like
NotePad. The instructions called “tags” are illustrated in the example in Listing 1, which is a
“bare bones” Web page. One can construct a simple Web page quickly by typing Listing 1 into a
text editor and then save the file with an extension of .htm or .html. For example, My-firstpage.htm. By changing the contents of the title and of the text in the body of this document, you
can create documents that will display in a browser window. Most HTML tags come with an
opening and closing tag. For example, all of the material between <html> and </html> is
considered to be HTML. The text between <title> and </title> is what is displayed at the top of
the browser window, and the text and other information between <body> and </body> are what
is displayed in the browser window (the “body” of the document).
ATI techniques overview
2
HTML files can also be created by Web page development programs like Dreamweaver,
a commercial program by Macromedia. I advise my students to learn to create their Web pages
using HTML before they even decide whether to purchase such commercial programs.
Knowledge of how HTML works helps you to understand what the development programs are
doing, and helps you avoid terrible errors that occur when an ignorant person uses a program he
or she doesn’t understand. When you understand HTML yourself, you will find it is often easier
to work directly in HTML, rather than struggle with a “What you see is what you get” type of
editor. Once you know what these programs are doing, you can also make an informed decision
of what software to purchase, if any.
A very powerful technique that is built into HTML is a technique known as “forms.” This
technique allows the client (your research participant) to type in answers to questions, enter
numbers, click a rating scale, or choose from a pull-down list, for example, in order to respond to
a questionnaire that could have been done by a paper and pencil questionnaire. This method can
be used to send data to be saved in a file on a server, from which it can be downloaded and
opened in a statistical package like SPSS or in a spreadsheet program, like Excel. The technique
can also be used to append data in the log file of the server, or to send them via email to an email
account.
Listing 2 shows a basic Web page containing a form that sends two data via email. The
first datum is the hidden variable whose value is “MyTest123”, which identifies the study. The
second datum is the person’s age (or whatever they typed in the box). You can insert your email
address and check out if you receive the email.
To send the data to the server’s log file, you can change the <FORM> tag as follows:
<FORM METHOD=get ACTION=http://www.cnn.com>
ATI techniques overview
3
This method will write the data in the server log file and also redirect the participant to
CNN. Perhaps better than CNN would be to route the person to a debriefing page that thanks the
participant.
To send the data to a CGI script that will save the data, one could change the FORM tag
as follows:
<FORM METHOD=post ACTION=http://ati-birnbaum.netfirms.com/cgi-bin/generic.pl>
This action will send the data to the address of a Perl file that saves the data to the
following Web site, which can be viewed at the following URL:
http://ati-birnbaum.netfirms.com/data/data.txt
Your data will be the last information contained in the above file.
To learn how to install the generic Perl script in your own server, read the instructions in
the following URL:
http://ati-birnbaum.netfirms.com/
Choosing a Server
Perhaps your university or department maintains a server where you can place your
surveys and experiments. If you are lucky, you may have helpful and knowledgeable tech
support on campus: people who can help you to house your experiments and your data files or
data base on that computer. To upload your files to the campus server from a remote site such as
your home computer, you can use an FTP (File Transfer Protocol) program. This requires that
your university provides you an account and an FTP password. There are many free programs
that perform FTP, which can be found by searching in sites such as www.download.com for
“FTP” or even using search engines such as www.google.com to find such sites for shareware
ATI techniques overview
4
and freeware. If you are allowed to work on the server directly, you can simply copy your files
from a flash drive or other data storage device to your folder of Web files on the server.
In order to save data from Web surveys and experiments on a server, you can create Web
pages that collect data and send data to a CGI script on the server that organizes and saves the
data. For example, you can use a Perl Script such the one written by William Schmidt that
emulates scripts created by PolyForm, and used in Birnbaum’s (2001) examples.
Unfortunately, a problem that many encounter at universities is that support technicians
who are in charge of servers are not knowledgeable about Web research and overly concerned
about security. They may not appreciate the distinction between real and imagined threats.
Some universities also create rules about what can or can’t be put on “their” Web sites. For
example, some universities require that half or more of the space of every Web page must be
filled with promotional banners and insignias of the university, to make everything look official
and uniform.
To avoid such problems in dealing with universities, one can use a private Web hosting
service. Some of these services offer basic Web hosting for free. Free Web hosting usually
means that commercial banner ads will be placed in some, if not all, of the Web pages in a site.
For a fee of about $5 per month, you can have a Web site without the ads and conduct your
research there.
For example, in 2008, the company www.netfirms.com offered basic Web hosting free,
including the option to include Perl scripts, as well as other features. To find this service, visit
http://www.netfirms.com/web-hosting/web-hosting-basic/
I have established an example site that also includes instructions on installing a generic Perl
script at the following URL, which illustrates how your site might look.
ATI techniques overview
5
http://ati-birnbaum.netfirms.com/
For many investigators, a commercial costing $5/month (to remove the ads) is the well worth the
expense. It allows one freedom of speech and of the press such as is no longer available at many
universities. It allows one to rest assured that others will make sure that the site is up and
running and secure, relieving one of the need to make sure that the power has not gone out, that
the system has not crashed, and that hackers are not attacking your site.
Some people, however, prefer to run their own server. This solution gives you maximal
control over all of the files on your computer and is a preferred method if you will be using a
data base that interacts with your participants or using a lot of server-side programs. A
disadvantage is that you need a good connection to the Internet, you need server software, you
need to learn how to use these programs, and you need to maintain the server and make sure that
you keep everything running. Fortunately, the best server software is free. It is included with all
new Macintosh computers. If you have a Mac, all you have to do is turn on the server that has
already been installed and make a few simple adjustments that are described in Birnbaum and
Reips (2005). If you have a Windows PC, you can download the free Apache software from the
following URL:
http://www.apache.org/
Anja Göritz has described how to install a package of free software including Apache
Server, along with PHP and MySQL, which are used to collect, organize and store data in a data
base. See Göritz and Birnbaum (2005) for a generic script in PHP that can be used to emulate
the scripts needed to work with Birnbaum’s (2001) examples.
ATI techniques overview
6
Use a University Server. The PHP Hypertext Preprocessor is a server-side, programming
language that allows Web developers to create dynamic content that interacts with databases.
Like Perl, PHP is free, but requires some study to learn to use its full powers.
Server Side Programming
Server side programming means that the program runs on the server and feeds dynamic
material to the client based on what the client puts in. The two most popular server-side
languages are PHP and Perl. Both of these free languages are described in tutorials that can be
found on the Web. Books are also available on these languages. Fraley’s book on Web
experimentation contains lessons in Perl. He shows how to use Perl to accomplish common
tasks in behavioral research such as random assignment of participants to conditions and random
ordering of items within a study.
If you plan to collect surveys and experiments from participants and then simply analyze
the results, you do not need any more than a generic script that saves data to a file on the server.
You do not need to run your own server.
However, if you intend to interact with your research participants in a dynamic manner,
you will want to run your own server and use server-side programming to save data in a data
base. The most popular data base is MySQL, which is also free. By data base is meant an
organized arrangement of information that can be added to, modified, or queried in various ways.
For example, suppose you have a long-term study in which people answer questionnaires and
respond to questions over a period of several years. You want the data base to keep track of
participants, to remind them if they have not completed what they should have completed, and
perhaps to compute scores based on their answers and give feedback or follow-up questions
contingent on the previous answers. The data base will hold information from previous surveys
ATI techniques overview
7
and the server-side software will ask the data base if the participant has completed everything
due by a given due date (which might depend on the date of the previous participation by that
participant). To accomplish these goals, your best solution is to install the Apache server, PHP,
and MySQL. One can find installation packages and instructions on the Web. Anja Goeritz has
used this method and has written tutorials on how to accomplish.
http://us.php.net/tut.php
http://www.goeritz.net/ati/
http://www.goeritz.net/brmic/
ATI techniques overview
8
Listing 1. A simple, “bare bones” Web page. Type this in a text editor (not word processor) and
save it with the file name, my_page.htm.
<html>
<head><title>The title goes here </title>
</head>
<body>
This is the text that appears in the window.
</body>
</html>
Listing 2. A bare bones Web form.
<html>
<head>
<title>My First Form</title>
</head>
<body>
<form method="post" action="mailto:[email protected]" enctype="text/plain">
<input type="hidden" name="00exp" value="MyTest123">
1. What is your age?
<input type="text" name="01age" size="4" maxlength="6">
<input type="submit" value="Send the Data">
</form>
</body>
</html>
ATI techniques overview
Technique
Uses
HTML —Hypertext markup language. An
Basic to Web research. See Birnbaum
HTML file is a plain text file whose name has
(2001), Chapters 2, 3, 4.
an extension of .htm or .html–e.g.,
Free. Many free Websites with good
9
MyWebPage.htm You can construct the file in a summaries and tutorials.
plain text editor (e.g., NotePad) or make it in a Presents and formats text, pictures,
fancy Web page editor (e.g., Dreamweaver).
graphics, sounds, video, media.
Do not leave spaces in the names of these files; Simple "programming" effects can be
instead, you can use the underscore character
created by design of hyperlinks. For
(shift-minus), as in my_web_page.htm. If you example, if you have different surveys for
plan to do research via the WWW, you need to men and women, smokers and nonsmokers,
learn basic HTML.
etc., you can use links to branch in a survey.
HTML Forms–this technique is really a part of See Birnbaum (2001), Chapter 5. See also
HTML, but deserves special emphasis here.
the connection to Schmidt’s Perl script that
The free programs, SurveyWiz and FactorWiz emulates the generic script used by
create Web pages containing HTML forms
Birnbaum. Billy’s script is called
which send the data to a generic CGI script,
SurveyWiz.pl, but it works with any of the
which organizes and save the data sent via the
HTML forms in Birnbaum’s (2001) book.
form, and directs the participant to a thank you
page.
SurveyWiz, FactorWiz–These are free
See Birnbaum (2000). These are easy to
ATI techniques overview
10
programs that allow you to make a simple
learn and easy to use. They are relatively
questionnaire or factorial experiment quickly.
restricted in what you can do. You can add
They are Web pages that make web pages that questions such as requiring a short typed
run experiments and surveys on the Web.
answer or numerical response, with scales
of radio buttons, or multiple choice. They
also allow blending with graphics to put
almost any paper-and-pencil study on the
Web.
Java–free programming language. Runs on
Very powerful programming language.
client side. Neither you nor participant need
"Object oriented programming language".
buy anything. Participant must have it installed Can be used to make stand-alone programs
and turned on, which is true for most users. To or web "applets" as shown by Gary. Has
put something on the Web, you must have at
other uses as well. Precise control and
minimum two files…HTML that calls the
measurement of graphics and "events" on
applet, and the applet’s MyApplet.class file.
the screen, such as the position of the
mouse.
JavaScript–free. Runs on client side. Neither
Powerful language. Can add little bits to
you nor the participant (client) needs to buy
Web pages to add functionality. Can make
anything. Participant must not have turned it
programs, including ones to control
off. Most people have it turned on. Can include experiments, manipulate sequence,
it in the Web page or "hide" it. Advantage:
randomize, time, measure time, etc. etc.
open source for scientific sharing.
See Birnbaum (2001), Chapters 17-19;
From here down: a possible disadvantage is that Birnbaum’s examples and Gary’s
ATI techniques overview
11
JavaScript, Java, Authorware Player, and other JavaScript examples
media players are not installed for some people.
Server Software–Apache server is free!
Running your own server might be an extra
Billy and Anja explain how to install this
burden on your time and energy. For
powerful program, which allows you to manage example, you may need to restart your
and run your own Web site(s). This gives you
machine, may be difficult if you travel a lot.
control over your experiments and data.
Server-Side Programming. Run your own
Billy described the installation of the free
Web server, or at least, get someone to install
Apache Web server and the free CGI,
your CGI scripts to save data. You need a script server-side programming language of Perl.
somewhere to save your data. Options: (1)
You get them both free and there are free
Birnbaum’s default uses a generic script saves tutorials on the Web. See Billy’s examples
to psych.fullerton.edu server, or to his ati-
and materials. You must use this technique
birnbaum.netfirms.com site, but data are public. to save data to your server, but it can also
Install Billy’s script on your server to save to a be used to do certain other tasks (e.g.,
secure location. This works for all people.
random assignment to conditions) that can
be done by other methods.
PERL–Perl is a free programming language. It A chapter on Perl and a tutorial on Perl will
ATI techniques overview
can be used to write CGI scripts that handle
12
be handed out. Billy Schmidt will discuss
server-side programming. For example, to save Perl examples.
data from your survey or experiment on your
server.
PHP–This is another method for server-side
Anja will introduce this technique, which is
programming. This is also free
quickly becoming a favorite technique.
Anja and Billy will discuss pros and cons of
Perl versus PHP, which can do many of the
same tasks.
MySQL–this is a package for managing
This package is also free! Anja will discuss
databases, which can be dynamically linked to how to install and how to use it. For some
Web content. For example, one could compute applications, you will want just a simple
statistics from a study and program the results
save the data script. However, for many
to automatically update online as more people
dynamic tasks, the database can provide the
participate.
answer. One can keep track of people who
come and go to the site, remind them what
they have and have not finished, etc.
Authorware Experiments. This approach is
See links by John Williams and Ken
expensive, but it has great power in creating
McGraw. This technique can do many of
experiments with control of timing,
the same things as Java, but uses a graphic
randomization, detection of screen events,
user interface with icons to control the
ATI techniques overview
13
insertion of media, and many other features.
experiment. The OleMiss site uses this
The participant must have installed the
method for its main power, but this
Authorware Player for the experiments to work. approach uses HTML and JavaScript as
Best in the lab, or with an Online Panel of
well as server-side programming, Excel
participants who have agreed to participate
Macros, and other techniques. Study the
(e.g., they are paid) and have installed the
manuals that come with Authorware
player.
program and the CD of tutorials that you
received.
WWW-SA–Survey Assistant Software.
See Links by Billy Schmidt, which describe
Free software, written by Billy Schmidt, is
comparisons of this free software against
more powerful than SurveyWiz, but it can do
commercial products.
more. Creates both the HTML and the Perl
Scripts to make computations on the data as
well as save them.
WEXTOR. This is a free program that creates See Articles and materials by Ulf.
the files needed for all sorts of experimental
LogAnalyzer–Program to analyze log files;
designs, especially between-subjects designs
fits well with WEXTOR approach, in that
that use different Web pages for different parts one can study all of the requests for files
of the study. Advantage of breaking up the
and places where dropouts occur. Dropouts
pieces: you can study dropout in detail. Creates are a very important subject.
visual display of design and skeleton of the
Web pages.
Image Creation and Manipulation. To create See John Krantz’s readings, links, and
ATI techniques overview
14
an image, scan a photo or graphic, or use a
materials. Also, Birnbaum (2001), Chapter
digital camera. Many programs, including
14 discusses some of the issues of sound
ImageJ can be used to edit, manipulate, and
compression (MP3, and RealAudio, etc.).
save image files in .bmp, .jpg, .gif, and other
formats.