CSU - DCE 0791 - Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Object-Oriented Perl and CGI.pm Instructor:

Slides:



Advertisements
Similar presentations
Introduction to CSS CSS Backgrounds - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Colors & Backgrounds Instructor: Joseph DiVerdi,
Advertisements

CGI Programming Part 2. Input Tags Many different ways of getting data from the user. The tag is used most often. has a type attribute –Specifies the.
HTML Introduction (cont.) 10/01/ Lecture 8, MAT 279, Fall 2009.
Chapter 9 Introduction to the Document Object Model (DOM) JavaScript, Third Edition.
ASP.NET Programming with C# and SQL Server First Edition
CGI Programming: Part 1. What is CGI? CGI = Common Gateway Interface Provides a standardized way for web browsers to: –Call programs on a server. –Pass.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Introduction to JavaScript Form Verification - Fort Collins, CO Copyright © XTR Systems, LLC Verifying Submitted Form Data with JavaScript Instructor:
1 ‘Dynamic’ Web Pages So far, we have developed ‘static’ web-pages, e.g., cv.html, repair.html and order.html. There is often a requirement to produce.
Chapter 9 Using Perl for CGI Programming. Computation is required to support sophisticated web applications Computation can be done by the server or the.
A First Program Using C#
Webmaster Overview Fort Collins, CO Copyright © XTR Systems, LLC Webmaster Overview Instructor: Joseph DiVerdi, Ph.D., MBA.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Embedding JavaScript In HTML Instructor: Joseph DiVerdi, Ph.D., MBA.
Introduction to CSS CSS Syntax - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Syntax & Semantics Instructor: Joseph DiVerdi,
CP476 Internet Computing CGI1 CGI is a common way to provide for specific computations on server side, interactions with users, or access to databases.
Using JavaScript in FORMs Fort Collins, CO Copyright © XTR Systems, LLC Learning to Use JavaScript in HTML FORMs Instructor: Joseph DiVerdi, Ph.D., MBA.
USING PERL FOR CGI PROGRAMMING
CSU - DCE Internet Security... Privacy Overview - Fort Collins, CO Copyright © XTR Systems, LLC Setting Up & Using a Site Security Policy Instructor:
Understanding Linux Directories Fort Collins, CO Copyright © XTR Systems, LLC Understanding the Linux Directory Structure Instructor: Joseph DiVerdi, Ph.D.,
CSU - DCE Advanced Perl CGI Operation - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to the Common Gateway Interface (CGI) on the.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: HTTP and CGI Fundamentals of Web Programming.
Building PERL Scripts on a Windows system* *and running those scripts on an Apache server!
JavaScript, Fourth Edition
12 1 Redirection CGI/Perl Programming By Diane Zak.
CSU - DCE Webmaster I HTML - Forms - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites using HTML - Introduction to Forms Instructor:
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
Pi & Random Numbers Perl Programming - Fort Collins, CO Copyright © XTR Systems, LLC Computing Pi & Random Numbers Instructor: Joseph DiVerdi, Ph.D., M.B.A.
CSU - DCE Advanced Perl First Web Page - Fort Collins, CO Copyright © XTR Systems, LLC Creating Your First Web Page Instructor: Joseph DiVerdi,
CSU - DCE Introduction to XML XML Core Concepts - Fort Collins, CO Copyright © XTR Systems, LLC XML Core Concepts or Some Gory Details Instructor:
CSU - DCE Advanced Perl Web Images - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Imaging on the World Wide Web Instructor: Joseph.
Cryptography Overview and PGP - Fort Collins, CO Copyright © XTR Systems, LLC Cryptography Overview and Pretty Good Privacy Instructor: Joseph DiVerdi,
Fundamentals of WWW Imaging Fort Collins, CO Copyright © XTR Systems, LLC Fundamentals of Web Imaging Instructor: Joseph DiVerdi, Ph.D., MBA.
CSU - DEO Introduction to CGI - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to the Common Gateway Interface (CGI) Instructor: Joseph DiVerdi,
A Little Bit About Cookies Fort Collins, CO Copyright © XTR Systems, LLC A Little Bit About Cookies Instructor: Joseph DiVerdi, Ph.D., M.B.A.
Introduction to CGI/Perl Please use speaker notes for additional information!
CSU - DCE Webmaster I Design with HTML #1 - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites using HTML #1 Instructor: Joseph DiVerdi,
Introduction to Object-oriented Programming Java API.
Perl Modules Darby Tien-Hao Chang Department of Electrical Engineering, National Cheng Kung University.
Fundamentals of WWW Imaging Fort Collins, CO Copyright © XTR Systems, LLC Fundamentals of Web Imaging Instructor: Joseph DiVerdi, Ph.D., MBA.
Intermediate CGI & CGI.pm Webmaster II - Fort Collins, CO Copyright © XTR Systems, LLC CGI Programming & The CGI.pm Perl Module Instructor: Joseph DiVerdi,
Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to & Overview of PHP Instructor: Joseph DiVerdi,
CSU - DCE Webmaster I Scaling Issues - Fort Collins, CO Copyright © XTR Systems, LLC Web Site Scaling Issues (or Size Really Does Matter) Instructor:
CSU - DCE Webmaster I HTML - Tables - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites using HTML - Introduction to Tables Instructor:
HTML Images Dr. Baker Abdalahq. The Image Tag and the Src Attribute In HTML, images are defined with the tag. In HTML, images are defined with the tag.
CSU - DCE Advanced Perl WWW Overview - Fort Collins, CO Copyright © XTR Systems, LLC How the WWW & the Internet Work Instructor: Joseph DiVerdi,
CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying Color Instructor: Joseph.
Creating a Remotely-Hosted Web Site Fort Collins, CO Copyright © XTR Systems, LLC Creating Your First Remotely-Hosted Web Site Instructor: Joseph DiVerdi,
Introduction of XML & XHTML Webmaster - Fort Collins, CO Copyright © XTR Systems, LLC Overview of XML & XHTML Instructor: Joseph DiVerdi, Ph.D., MBA.
Introduction to JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Introduction to JavaScript Programming Instructor: Joseph DiVerdi, Ph.D., MBA.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
Webmaster II Introductions - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Webmaster II Instructor: Joseph DiVerdi, Ph.D., MBA.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying Length Instructor:
CSU - DCE Introduction to CSS CSS URLs - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying URLs Instructor: Joseph.
CSU - DCE Advanced Perl Introductions - Fort Collins, CO Copyright © XTR Systems, LLC Advanced Perl Programming Instructor: Joseph DiVerdi, Ph.D.
Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Server Side Includes (SSI) Instructor: Joseph DiVerdi,
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
PHP Introduction & Overview Fort Collins, CO Copyright © XTR Systems, LLC Introduction to & Overview of PHP Instructor: Joseph DiVerdi, Ph.D., MBA.
JavaScript Syntax Fort Collins, CO Copyright © XTR Systems, LLC Introduction to JavaScript Syntax Instructor: Joseph DiVerdi, Ph.D., MBA.
Sending data with CGI/Perl Please use speaker notes for additional information!
Lesson 11. CGI CGI is the interface between a Web page or browser and a Web server that is running a certain program/script. The CGI (Common Gateway Interface)
Ashima Wadhwa Java Script And Forms. Introduction Forms: –One of the most common Web page elements used with JavaScript –Typical forms you may encounter.
CSU - DCE Webmaster I HTML & URLs - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites With HTML - Using Effective Links Instructor:
IST 220 – Intro to Databases
Perl Modules.
Murach's JavaScript and jQuery (3rd Ed.)
Presentation transcript:

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Object-Oriented Perl and CGI.pm Instructor: Dr. Joseph DiVerdi

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Object-Oriented Perl Not a class in Object-Oriented Programming Emphasis is on use of Object-Oriented Perl Modules rather than on the creation of them Perhaps the most important component of Object-Oriented Programming –Encapsulation - the hiding of actual data structures, exposing instead a limited, well- documented interface: a set of actions which can manipulate these data structures

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Some Definitions object:: a data structure with a collection of behaviors that can be performed on it method: a behavior performed on an object class: a definition of methods inherit: receive definitions

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Some Definitions (con’t) attribute: a property of an object Identity: each object, although a member of a class and possessing similar attributes, is unique and unto itself constructor: a behavior which sets up an object and initializes its data structures destructor: a behavior which performs clean up on an object before the object is destroyed

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC An Example My Miata is an object It is a member of the class - Car It has attributes - red, convertible It is capable of behaviors - steering, forward motion, backward motion

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Another Example A particular rectangle is a member of a class rectangle, it has attributes such as lower-left and upper-right corners, and a color, it is capable of certain behaviors like calculating its area

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC References Objects are generally (but not exclusively) identified by references –References are easy to sling around - independent of the size of the referred structure Typical syntax: –“class method” my $object = Class_name->new_method(); my $object = Class_name->new_method(arg1); –“object method” $return_value = $object->method_name(); $return_value = $object->method_name(arg1, arg2);

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Using Net::FTP.pm Bad module! –Cannot run under “-w” –Can run under “use strict” #!/usr/bin/perl use strict; use Net::FTP; my $port = Net::FTP->new("ftp.verinet.com"); die "'new' failed because unless $port; $port->login('anonymous', or die "Can't login.\n";

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Using Net::FTP.pm (con’t) print "\nCurrent working directory is '", $port->pwd(), "'.\n"; print join("\n", $port->dir()), "\n"; $port->cwd('pub') or die "Can't change working directory.\n"; print "\nCurrent working directory is '", $port->pwd(), "'.\n"; print join("\n", $port->dir()), "\n"; $port->cwd('linux/www/browsers/netscape/4.04/base_install') or die "Can't change working directory.\n"; print "\nCurrent working directory is '", $port->pwd(), "'.\n"; print join("\n", $port->dir()), "\n"; $port->get('README.txt') or die "Can't get a file.\n"; $port->quit() or die "Can't quit.\n"; exit;

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Simple HTML Create a directory named “html” in top level directory, e.g., “/users/web0/html” and change mode to “755” In “html” create a file named “index.html” and change mode to “644” Simple web page This is a web page. Use web browser to access URL “

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Simple CGI Create a directory named “cgi-bin” in top level directory, e.g., “/users/web0/cgi-bin” and change mode to “755” In “cgi-bin” create a file named “first.pl” and change mode to “755”

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Simple CGI (continued) #!/usr/bin/perl -w print <<__HTML__ Content-type: text/html Simple web page This is a web page. __HTML__

CSU - DCE Webmaster JavaScript Class - Fort Collins, CO Copyright © XTR Systems, LLC Simple CGI (continued) Use web browser to access URL “