Interactive Programming Using CGIPerl - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Interactive Programming Using CGIPerl

Description:

Interactive Programming Using CGI/Perl. Agenda. Who needs CGI and why? How ... Text areas (multi line with auto scroll bars) Please write acerbic comments here: ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 33
Provided by: peterja5
Category:

less

Transcript and Presenter's Notes

Title: Interactive Programming Using CGIPerl


1
Interactive Programming Using CGI/Perl
2
Agenda
  • Who needs CGI and why?
  • How does the web work?
  • Static and dynamic web pages
  • What will CGI do for me?
  • What do I need to start?
  • How do I do it?

3
Agenda
  • Who needs CGI and why?
  • How does the web work?
  • Static and dynamic web pages
  • What will CGI do for me?
  • What do I need to start?
  • How do I do it?

4
Who Needs CGI Anyway?
Students Honors thesis (25 x 14
350) Faculty Need for international
participants Participants unavailable in
quantity Overseas collaboration Specialist
groups
5
How does the web work?
The WWW is a distributed system Files are broken
up and moved around in packets Packets take many
different routes Objects (web pages jpg, avi
etc.) are ind. documents E.g., Accessing a
document is like ordering a book from Amazon.
and they send each page in a different envelope,
using different couriers
6
How does the web work?
Uses multiple systems - HTTP HyperText Transfer
Protocol TCP/IP Transmission Control Protocol /
Internet Protocol FTP File Transfer Protocol
(client program like WinSCP) HTML Hypertext
Markup Language URL Uniform Resource
Locator Perl script language
7
How does the web work?
Uses multiple systems - HTTP HyperText Transfer
Protocol TCP/IP Transmission Control Protocol /
Internet Protocol FTP Client program (like
WinSCP) HTML Hypertext Markup Language URL
Uniform Resource Locator Perl script language
8
Static and Dynamic Web Pages
Static pages are 1. Held on a server (OP's Win
NT, UNIX, Apache, Linux) 2. Requested by a
browser (using hyperlink) 3. Server OP packets
file and sends 4. Browser receives file and sends
back information
9
Static and Dynamic Web Pages
Static pages architecture
Server
Browser sends request
Server returns document (s)
Browser
10
Static and Dynamic Web Pages
Static pages architecture User sees documents
but can't interact with it Experimenter can show
stimuli, but can't collect data
11
Static and Dynamic Web Pages
Dynamic pages (2 types) are Either held on a
server (like static pages) but file sent depends
on input from the user/browser Or Pages not
held on server but made "on the fly" by a
computer program
Example 1 Depends on user
12
Depends on User Input
Jane Doe
26
Female
Female
Male
http//mysite.com/washingup.html
http//mysite.com/astonmartin.html
13
Depends on User Input
ENV IP address Country City ISP Browser Time
Every time you click you send environment
information
IE v7
Firefox
14
Static and Dynamic Web Pages
Dynamic pages (2 types) are Held on a server
(like static pages) but sent file depends on
input from the user/browser Or Pages not held
server but made "on the fly" by a computer program
Example 2 On the fly
15
(No Transcript)
16
Normal web pages end in .html . this ends in
.pl Constructed by a computer program (.pl
Perl), does not exist on server
17
Static and Dynamic Web Pages
CGI (Common Gateway Interface) is used to
generate User dependent interactions On the fly
pages CGI is not A programming language
CGI capability on a server will work with nearly
any language
18
Static and Dynamic Web Pages
Dynamic pages architecture
Browser requests document e.g form on web page
Server sends complete document
Server
Server rec. CGI request
Perl Program
Program constructs new document or sends specific
one that already exists
19
What Will CGI Do For Me?
Tools (objects) can be put on web pages (forms)
20
What Will CGI Do For Me?
Tools (objects) that can be put on web pages
(forms) are Text boxes (collect typed info)
Name
21
What Will CGI Do For Me?
Tools (objects) that can be put on web pages
(forms) are Text areas (multi line with auto
scroll bars)
Please write acerbic comments here
22
What Will CGI Do For Me?
Tools (objects) that can be put on web pages
(forms) are Radio buttons (one choice from X
options)
23
What Will CGI Do For Me?
Tools (objects) that can be put on web pages
(forms) are Check boxes (multiple choices from
X options)
24
What Will CGI Do For Me?
Tools (objects) that can be put on web pages
(forms) are Submit button (auto submits form
contents to server)
25
What Will CGI Do For Me?
Forms are particularly useful for Survey
methods Experimental methods (where RT and ISI is
not critical) Evidence that collecting RT's is
possible (ISI?) Book Birnbaum, M. (2000). Psych
experiments on the Internet. New York Academic
Press
26
What Do I Need To Start?
Must have CGI enabled web server Difficult as
CGI poses security and spam risks But Bilkent
will allow it FTP client software to upload web
pages and CGI scripts Win SCP (free) Web
authoring tools to make HTML and Perl files Cute
HTML (free)
27
What Do I Need To Start?
Make pages sexier and easier to
construct Decent CSS template for the HTML
files Free from Open Source Web Design
www.oswd.org/ Dreamweaver Web Authoring Er.
known to be "free" around campus ActivePerl from
ActiveState to test Perl scripts Free from
http//www.activestate.com/Products/ActivePerl/
28
How Do I Do It?
When you access your Bilkent account using
WinSCP
29
How Do I Do It?
When you access your Bilkent account using
WinSCP
30
How Do I Do It?
When you access your Bilkent account using
WinSCP
31
How Do I Do It?
Dynamic pages architecture
Browser requests document
Server sends complete document
Server
My Perl Programs
My Web Pages
And writes to a file (data collection)
32
I Want This! What Now?
1. Ask Bilkent Computing to enable cgi on your
account Make note of cgi URL alias 2. Go to my
website and download Cute HTML Win SCP 3. Go
to the web and download A web page template
using CSS ActivePerl 4. Build static web pages
Write a Comment
User Comments (0)
About PowerShow.com