INT322. By the end of this week you will: (1)understand the interaction between a browser, web server, web script, interpreter, and database server.

Similar documents
Apache 2.0 Installation Guide

People Data and the Web Forms and CGI CGI. Facilitating interactive web applications

Chapter 27 Hypertext Transfer Protocol

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

APACHE WEB SERVER. Andri Mirzal, PhD N

Computer Networks. Lecture 7: Application layer: FTP and HTTP. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

7 Why Use Perl for CGI?

Code Estimation Tools Directions for a Services Engagement

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

MatrixSSL Getting Started

1. When will an IP process drop a datagram? 2. When will an IP process fragment a datagram? 3. When will a TCP process drop a segment?

mod_tcl TCL inside the Apache web server

Project Report on Implementation and Testing of an HTTP/1.0 Webserver

Perl/CGI. CS 299 Web Programming and Design

10. Java Servelet. Introduction

Outline Definition of Webserver HTTP Static is no fun Software SSL. Webserver. in a nutshell. Sebastian Hollizeck. June, the 4 th 2013

Dynamic Content. Dynamic Web Content: HTML Forms CGI Web Servers and HTTP

SendMIME Pro Installation & Users Guide

Forms, CGI Objectives. HTML forms. Form example. Form example...

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007

dotdefender v5.12 for Apache Installation Guide Applicure Web Application Firewall Applicure Technologies Ltd. 1 of 11 support@applicure.

DEVELOPER S COOKBOOK. Installing mod_perl CHAPTER 1. Introduction

CGI An Example. CGI Model (Pieces)

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

PHP Debugging. Draft: March 19, Christopher Vickery

Table of Contents. Java CGI HOWTO

Lecture 2. Internet: who talks with whom?

Fachgebiet Technische Informatik, Joachim Zumbrägel

Outside In Image Export Technology SDK Quick Start Guide

Instructor: Betty O Neil

1 Recommended Readings. 2 Resources Required. 3 Compiling and Running on Linux

Interactive Applications in Teaching with the MATLAB Web Server. 1 Aim and structure of the MATLAB Web Server

OVERVIEW OF ASP. What is ASP. Why ASP

What is Distributed Annotation System?

Software Deployment and Configuration

About This Document 3. Integration and Automation Capabilities 4. Command-Line Interface (CLI) 8. API RPC Protocol 9.

Example of Standard API

Internet Technologies_1. Doc. Ing. František Huňka, CSc.

Efficiency of Web Based SAX XML Distributed Processing

M3-R3: INTERNET AND WEB DESIGN

Application layer Web 2.0

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

Installation Guide for AmiRNA and WMD3 Release 3.1

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

Web Server for Embedded Systems

Greenstone Documentation

Playing with Web Application Firewalls

Source Code Review Using Static Analysis Tools

World Wide Web. Before WWW

HOST EUROPE CLOUD STORAGE REST API DEVELOPER REFERENCE

Web Services April 21st, 2009 with Hunter Pitelka

ClickCartPro Software Installation README

Web Services for Management Perl Library VMware ESX Server 3.5, VMware ESX Server 3i version 3.5, and VMware VirtualCenter 2.5

The Application Layer. CS158a Chris Pollett May 9, 2007.

Linux command line. An introduction to the Linux command line for genomics. Susan Fairley

Copyright 2014, SafeNet, Inc. All rights reserved.

JobScheduler Web Services Executing JobScheduler commands

AES Crypt User Guide

smtp-user-enum User Documentation

TIBCO ActiveMatrix BusinessWorks Plug-in for TIBCO Managed File Transfer Software Installation

W3Perl A free logfile analyzer

HTTP Protocol. Bartosz Walter

Lecture 11 Web Application Security (part 1)

Web Server Manual. Mike Burns Greg Pettyjohn Jay McCarthy November 20, 2006

HTTP - METHODS. Same as GET, but transfers the status line and header section only.

WEB2CS INSTALLATION GUIDE

The C Programming Language course syllabus associate level

Using NXLog with Elasticsearch and Kibana. Using NXLog with Elasticsearch and Kibana

SIP: Protocol Overview

LSN 10 Linux Overview

Configuring Sun StorageTek SL500 tape library for Amanda Enterprise backup software

HTTP 1.1 Web Server and Client

EOP ASSIST: A Software Application for K 12 Schools and School Districts Installation Manual

Apache Jakarta Tomcat

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

How to write a CGI for the Apache Web server in C

LabVIEW Internet Toolkit User Guide

Cybozu Garoon 3 Server Distributed System Installation Guide Edition 3.1 Cybozu, Inc.

Integrating SNiFF+ with the Data Display Debugger (DDD)

EFFICIENCY CONSIDERATIONS BETWEEN COMMON WEB APPLICATIONS USING THE SOAP PROTOCOL

How to use PDFlib products with PHP

IHS Emergency Department Dashboard

People Data and the Web Forms and CGI. HTML forms. A user interface to CGI applications

10CS73:Web Programming

Computer Programming in Perl: Internet and Text Processing

MONIT. UNIX Systems Management

SimbaEngine SDK 9.4. Build a C++ ODBC Driver for SQL-Based Data Sources in 5 Days. Last Revised: October Simba Technologies Inc.

GestióIP IPAM v3.0 IP address management software Installation Guide v0.1

Setting up PostgreSQL

Exercises: FreeBSD: Apache and SSL: SANOG VI IP Services Workshop

Transcription:

Objective INT322 Monday, January 19, 2004 By the end of this week you will: (1)understand the interaction between a browser, web server, web script, interpreter, and database server. (2) know what Perl is and why it is used on the web. Today Announcements From Last Week... Browser Interactions Quiz Announcements See me for your account if you don t have one yet. Exercise 1 due Friday, January 23 Post a message on Blackboard Edit your Zenit homepage Attending the other section of the course... Web Sites: Reminder Blackboard - Marks, Discussion http://my.senecacollege.ca/ INT322 Web Site http://cs.senecac.on.ca/~int322/ Web Sites: Reminder Instructor s Home Page http://cs.senecac.on.ca/~ctyler/ Instructor s Zenit Home Page http://zenit.senecac.on.ca/~tyler/ Building on Last Session... bash script interpreter Pathnames Review... Absolute Relative Relative-to-home

Namespace Mapping Web pathnames vs. file pathnames Translation of namespaces Not necessarily 1:1 Web Interactions - Static Browser -> Apache Apache <-> Filesystem Apache -> Browser Web Interactions - Static Browser -> Apache http(+content) Apache <-> Filesystem Apache -> Browser http+content Web Interactions - Dynamic Browser -> Apache http(+content) Apache <-> Filesystem Apache -> OS exec() CGI(+content) OS exec() -> Interpreter Interpreter -> Script Script -> Apache CGI+http+content Apache -> Browser http+content Web Interactions - HTTP Header Format HTTP Headers are based on...? Web Interactions - HTTP Header Format HTTP Headers are based on... RFC822 (E-mail) Method/status Header1: value Header2: value blank line Body of message Web Interactions - Request Headers (Browser) Web Interactions - Response Headers (Server) GET / HTTP/1.1 Host: zenit.senecac.on.ca blank line HTTP/1.1 200 OK Date: Mon, 09 Sep 2002 14:49:09 GMT Connection: close Content-Length: 1761 Content-Type: text/html blank line <xml...

MIME-Types MIME-Types MIME MIME stands for...? MIME Multimedia Intenet Mail Extensions Format of the content type header? MIME-Types Common MIME-Types MIME Multimedia Intenet Mail Extensions Raw text: Content-type: type/subtype Common MIME-Types Common MIME-Types Raw text: text/plain xhtml: Raw text: text/plain xhtml: text/html PNG graphic: Common MIME-Types Common MIME-Types Raw text: text/plain xhtml: text/html PNG graphic: image/png Ogg Vorbis song: Raw text: text/plain xhtml: text/html PNG graphic: image/png Ogg Vorbis song: audio/ogg MPEG film:

Common MIME-Types Raw text: text/plain xhtml: text/html PNG graphic: image/png Ogg Vorbis song: audio/ogg MPEG film: video/mpeg CGI CGI Stands for? CGI Common Gateway Interface CGI Defines...? CGI Common Gateway Interface Defines server <-> script interaction How many paths? CGI Common Gateway Interface Defines server <-> script interaction 4 paths (2 each direction) What are the paths? CGI Common Gateway Interface Defines server <-> script interaction 4 paths (2 each direction) stdin stdout stderr environment variables Stdin, Stdout, Stderr Stdin, Stdout, Stderr Stdin post form element values from browser via Apache Stdout headers, content to browser via Apache Stderr error message to logfiles via Apache (usually) Environment Variables client and server details query-string value from URI

Basic CGI Program Requirements Basic CGI Program Requirements 1. Must be executable by? 1. Must be executable by the web server. 2. Must output? Basic CGI Program Requirements Basic CGI Program Requirements 1. Must be executable by the web server. 2. Must output at least one header followed by a blank line (usually the Content-type header). 3. Must finish executing before? 1. Must be executable by the web server. 2. Must output at least one header followed by a blank line (usually the Content-type header). 3. Must finish executing before anything is sent. A Word on Web Design & CGI A Word on Web Design & CGI Many sites have good programming or good design. The two are not mutually exclusive! A good E-Commerce site should have: Consistent navigation Feedback on WHERE you are Location in the process Colour & graphical mode cues What is Perl? Quiz! Perl is an acronym for "Practical Extraction and Report Language". started out as a scripting language to supplement rn, the USENET reader created by Larry Wall.

What is Perl? Perl History: 1987 Perl: is an interpreted language is optimized for string manipulation, I/O and system tasks. has built-in functions for almost all Unix system commands. Larry Wall posted Perl 1.0 to the usenet group comp.sources. Perl History: 1988 Perl History: 1989 Perl 2.0 is released with more text processing enhancements. Perl 3.0 is released under the GNU General Public License. The open source community works on creating many modular extensions. Perl History: 1990 Perl History: 1991 Tom Christiansen s The Answer to All Man s Problems is published. Programming Perl, by Larry Wall and Randal L. Schwartz, is published by O Reilly & Associates (the Camel) Perl 4.0 is released under the GPL and the new Perl Artistic License. Perl History: 1992 Perl History: 1993 MacPerl is released (non-mac interface). Final version of Perl 4 released. MacPerl 4.1.0 has true Mac interface. Perl community picks up steam -- mailing lists. Learning Perl by Randal L. Schwartz is published.

Perl History: 1994 Perl History: 1995 Perl 5 is born. Perl 5 was a major reorganization that fixed may of the language s limitations. First recorded Perl CGI script. Work on CPAN begins in earnest. Tim Bunce introduces DBI/DBD. Perl History: 1996 Perl History: 1997 The Perl Institute (TPI), a not-for-profit perl advocacy organization, is created. The Perl Institute announces a web-accessible mirror of CPAN. The Perl Journal publishes its first issue. Perl History: 1998 Perl History: 1999 Perl Mongers is incorporated as a not-for-profit in New York state. CPAN grows to 100 mirror sites. ActiveState Tool Corp. announces a corporate support package for Perl called PerlDirect. Perl s usage in developing web applications grows. Perl History: 2000 Perl History: 2001 Perl 5.6 is released for Windows, Solaris and Linux with Unicode support. Perl 5.6.1 is released. Version number: <major>.<minor>.<path> Work on Perl 6 begins. Perl 6 is a major rewrite Separates compiler from runtime (Parrot)

Perl History: 2002 Why Perl for web development? Perl 5.8 released with strong Unicode support. CGI (the Common Gateway Interface) and Perl. Work on Perl 6 continues. Perl is rapidly developing. Text processing strength good match for web. Why Perl for web development? Why Perl for web development? Free language, many online resources. Interpreted - fast debug cycle. Integrates well with Internet protocols. Extensible using modules. Links http://www.perl.org/ http://www.perl.com/ http://www.cpan.org/ http://www.opensource.org/licenses/ Is Perl Installed? Is Perl installed? What is the path? Needed for #! Demonstration... What Version is Installed? Getting and Installing Perl: Availability Current version is 5.6.1 -v argument reports version -V gives installation details Available under GPL and/or Artistic License. Standard in RedHat, Slackware and SuSE. Downloadable as source & binary.

Common Download Sites Acquiring and installing Perl http://www.perl.com/ http://www.cpan.org/ Use vendor distribution first. Otherwise use perl.com/cpan.org source or binaries. Installing from Source gunzip stable.tar.gz tar xvzf stable.tar follow README and INSTALL files Install from Source./Configure make make test make install (as root) Installing from Binaries Modules RPMs: rpm -i ActivePerl-5.6.1.631-i686-linux.rpm A module is a collection of functions. Several included in core distribution. Modules Installing Modules Three types: Pragmatic Library Object Obtain from CPAN gunzip yourmodule.tar.gz tar xvf yourmodule.tar perl Makefile.PL make make test make install

Automated Install perl -MCPAN -e shell get make test install readme