You are on page 1of 13

Web Servers and Server-Side

Scripting
Introduction
In this chapter we will discuss a software called WEB
SERVER
Responds to client requests by providing resources such
as HTML document
When users enter URL address into a web browser, they
are requesting a specific document from a web server
The web server maps the URL to a resource on the
server and returns the requested resource to the client
During this interaction, the web server and the client
communicate using the platform-independent Hypertext
Transfer Protocol (HTTP)
HTTP Transactions
The HTTP protocol allows clients and servers to
interact and exchange information in a uniform
and reliable manner
URIs HTTP uses URIs (Uniform Resource
Identifiers) to identify data on the Internet
URLs (Uniform Resource Locators) URIs that
specify document locations
A URL contains information that directs a
browser to the resource that the user wishes to
access
Parts of a URL
http://www.uitm.edu.my/fpm/index.html
The http:// - indicates that the resource is to
be obtained using the HTTP protocol
The middle portion www.uitm.edu.my is
the server qualified hostname the name
of the server on which the resources
resides
This computer is referred to as the host
Parts of a URL
The hostname www.uitm.edu.my is translated
into an IP address
This translation is performed by a domain name
system (DNS) server a computer that
maintains a database of hostname and IP
addresses
The remainder of the URL /fpm/index.html
specifies both the name of the requested
resource and its path or location on the web
server
Making a request and receiving a response
Multitier Application Architecture
Multitier Application Architecture
Web-based applications are multitier
applications that divide functionality into
separate tiers
Although tiers can be located on the same
computer, the tiers of web-based applications
typically reside on separate computer
The bottom tier (also called the data tier or the
information tier) maintains the applications data
The middle tier implements business logic,
controller logic and presentation logic to control
interactions between the applications client and
its data
Multitier Application Architecture
Business logic in the middle tier enforces
business rules and ensures that data is
reliable before the server application
updates the database or present the data
to users
Business rules dictate how clients can and
cannot access application data, and how
applications process data
Multitier Application Architecture
The top tier, or client tier, is the
applications user interface
In response to user actions, the client tier
interacts with the middle tier to make
requests and to retrieve data from the
information tier
The client tier then displays the data
retrieved for the user
Client-Side Scripting
Validate user input, to interact with the
browser, to enhance web pages
Browser dependency
Attack and security
Code executed at client
Scripts are visible to the client

Server-Side Scripting
Executed on the server
Scripts are not visible to the client
Fast
Secure
PHP, JSP, ASP, etc

Web Server
Apache/ IIS
DBMS
MySQL/
MSSQL/ MSAccess
Client
Firefox/ IE/ Opera
Server-Side
Script
PHP, ASP, JSP, Phyton
Etc.
Client-Side Script
PHP + Apache + MySQL
ASP + IIS + MSSQL
JSP + TOMCAT + MySQL
Microsoft Platform
Open-Source Platform
Java Platform
WAMP/ XAMPP/ LAMP/ MAMP