Nic Shulver, Intro: Developing Server Applications What is a server? Many types of server – File server – file: networked file.

Slides:



Advertisements
Similar presentations
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 1 Introduction to Perl and CGI.
Advertisements

E-Commerce CMM503 – Lecture 8 Stuart Watt Room C2.
DT228/3 Web Development WWW and Client server model.
Kyung Hee University 1 1 Application Layer. 2 Kyung Hee University Position of Application Layer.
Server-Side vs. Client-Side Scripting Languages
Creating WordPress Websites. Creating a site on your computer Local server Local WordPress installation Setting Up Dreamweaver.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Introduction to Web Based Application. Web-based application TCP/IP (HTTP) protocol Using WWW technology & software Distributed environment.
Website Development with PHP and MySQL Introduction.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
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.
8 Server Side Scripting.
ECA 228 Internet/Intranet Design I Intro to the Web.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
Quick Tour of the Web Technologies: The BIG picture LECTURE A bird’s eye view of the different web technologies that we shall explore and study.
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
Web Page A page displayed by the browser. Website Collection of multiple web pages Web Browser: A software that displays web pages on client computer.
The PHP Story. PHP Story PHP is a programming language. Incorporate(join) sophisticated business logic. Widely used general purpose scripting language.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
CP3024 Lecture 3 Server Side Facilities. Lecture contents  Server side includes  Common gateway interface (CGI)  PHP Hypertext Preprocessor (PHP) pages.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Chapter 1: Introduction to Web
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Nic Shulver, Intro: Developing Server Applications What is a server? Many types of server – File server – file: networked file.
Copyright (c) 2010, Dr. Kuanchin Chen1 The Client-Server Architecture of the WWW Dr. Kuanchin Chen.
Introduction to Internet Programming (Web Based Application)
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
Website Design Lecture 1. Outline Introduction to the module Outline of the Assessment Schedule Lecture Static XHTML, client side and server side Why.
MySQL and PHP Internet and WWW. Computer Basics A Single Computer.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
1 Welcome to CSC 301 Web Programming Charles Frank.
1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
Enterprise PHP - Introduction Enterprise Client-Server Development with PHP Nic Shulver, FCES, Staffordshire University A fifteen credit module based on.
CSE 154 LECTURE 5: INTRO TO PHP. URLs and web servers usually when you type a URL in your browser: your computer looks up the.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
 Previous lessons have focused on client-side scripts  Programs embedded in the page’s HTML code  Can also execute scripts on the server  Server-side.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
JavaScript and Ajax (Internet Background) Week 1 Web site:
 Before you continue you should have a basic understanding of the following:  HTML  CSS  JavaScript.
1 PHP Intro PHP Introduction After this lecture, you should be able to: Know the fundamental concepts of Web Scripting Languages in general, PHP in particular.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
CGS 3066: Web Programming and Design Spring 2016 Introduction to Server-Side Programming.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Web Programming Language
WWW and HTTP King Fahd University of Petroleum & Minerals
JavaScript and Ajax (Internet Background)
Introduction and Principles
Warm Handshake with Websites, Servers and Web Servers:
CNIT 131 Internet Basics & Beginning HTML
PHP / MySQL Introduction
Chapter 27 WWW and HTTP.
Web Page Concept and Design :
Web Servers (IIS and Apache)
Web Application Development Using PHP
Presentation transcript:

Nic Shulver, Intro: Developing Server Applications What is a server? Many types of server – File server – file: networked file space. FTP server – ftp: remote file space, often read-only. Web server – http: web pages and more. Mail server – mail: system. News server – news: newsgroups messages, used to be huge.

Nic Shulver, Intro: Developing Server Applications Web Servers Web servers used to be very simple: Accept requests for information, Respond with static HTML pages and graphics. Now servers can be “asked” to run programs on the server Originally called Common Gateway Interface (CGI) applications, now superseded by ISAPI/NSAPI. CGI/ISAPI/NSAPI programs use resources on the server to output information to the client browser.

Nic Shulver, Intro: Developing Server Applications Servers: IIS, Apache Internet Information Server Commercial server for Windows Comes with XP Pro on the install CD as an extra Apache ( Apache Free, open-source software Widely used, Linux/Unix/Mac/Windows support Easy to use on a stand-alone PC

Nic Shulver, Intro: Developing Server Applications Why “CGI”? Common - all server platforms use this standard. Gateway - controlled access to the server’s processing resources. Interface - client-server resource connector function. CGI - a method that allows data to be executed or interpreted instead of just delivered and displayed. NB Modern ISAPI/NSAPI is much more efficient than the original CGI.

Nic Shulver, Intro: Developing Server Applications HTML vs. CGI “ This reference asks the server (Gawain) to look in the (shortcut to the) cmtnas directory and find a file called “homepage.htm”. The simple server knows that.htm and.html files are HTML and must be sent, without further processing, to the browser. Some servers also check for “commands” inside the HTML – often SSI, “server-side includes”.

Nic Shulver, Intro: Developing Server Applications HTML vs. CGI This reference asks the server (fred.co.uk) to look in the (shortcut to the) scripts directory and find a file called “debug.php”. The server knows that a.php file is a page with embedded script and must be executed by the Web server software as a sub-process. Any output from running the script is sent to the browser.

Nic Shulver, Intro: Developing Server Applications CGI+ languages Web server programming can be accomplished using many suitable languages. Popular ones are; Modern: PHP (.php), VBScript or JScript (in ASP,.asp), ASP.NET (.aspx) Java Server Pages (.jsp) Old CGI: perl (.pl), C, C++, any “normal” programming language (.exe)

Nic Shulver, Intro: Developing Server Applications PHP PHP means “PHP Hypertext Pre-processor” (sic). Originally it was known as “Personal Home Pages” but that is poor for marketing as a business solution! It was also called “perl Hypertext Pre-processor” but PHP is no longer just a web-version of perl. The PHP language is a mixture of C, perl and others. PHP is supported on many platforms (Mac, PC, Linux…).

Nic Shulver, Intro: Developing Server Applications What’s it for? A plain HTML document that the Web server delivers is static, which means it doesn't change. A CGI program, on the other hand, is executed in real- time, so that it can output dynamic information. CGI allows someone visiting your Web site to run a program on your machine that performs a specified task – maybe updating a weather report or grabbing a digital photo. E-Commerce, blogs, web services, discussion areas… many use PHP.

Nic Shulver, Intro: Developing Server Applications PHP – print all server variables All $_SERVER settings <?php foreach($_SERVER as $key=>$sItem) {echo "$key = [$sItem] \n"; } ?>

Nic Shulver, Intro: Developing Server Applications Example Script Output (fragment) SCRIPT_NAME = [/phpTest/test.php] QUERY_STRING = [] REMOTE_USER = [DEXTER\nic] REQUEST_METHOD = [GET] SERVER_PORT = [80] SERVER_PROTOCOL = [HTTP/1.1] SERVER_SOFTWARE = [Microsoft-IIS/5.1] REQUEST_URI = [/phpTest/test.php] URL = [/phpTest/test.php] SCRIPT_FILENAME = [c:\inetpub\wwwroot\phpTest\test.php] ORIG_PATH_INFO = [/phpTest/test.php]

Nic Shulver, Intro: Developing Server Applications Raw CGI data - encoding Information is sent from a form to a script in a very odd format. If field “name” has the value “G Singh”... and “job” has the value “principal lecturer”... the script will receive the string “name=G%20Singh&job=principal%20lecturer”. But PHP splits this up for you and makes it easy to use, so you don’t usually worry about it.

Nic Shulver, Intro: Developing Server Applications Summary We have briefly met different types of server. We have discussed the reasons for needing CGI+. … and contrasted plain HTML with dynamically created content. We have noted the wide range of CGI+ languages in use on the Internet. … and looked at a specific language, PHP. We have briefly considered standard URL-encoded parameters.