WBP UNIT 1 Part A

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 82

Syllabus

Recommended Books
Topic -1

Introductions to Web Applications


Web Application
Architecture
Client Server Model
Server Applications (Software)
 Management and maintenance of
Data including
 User login data
 Application data
 Data processing
 Centralized
 Access via Login
Client Applications (Software)
 Provides user interface
 Stores some settings
 Can do some data processing
 Little to no application data
storage
 Same view of data no matter
where you login
Client-Server Advantages
 Centralized Data Storage
 No data redundancy (no duplication of data)
 Reduces data dependencies
 If data is stored on each user’s system and each
system is different than data depends on how the
user system is designed
 Data can not be shared easily if such dependencies
exist
Classic Example:
Early Banking Systems
 Network: Local Area Network (LAN) covering local
office branch.
 Server: Mainframe-like server “in the back” running
custom banking system
 Client: Windows PC with client interface for each
bank teller.
 Data is the same no matter what teller you go to.
 Data is NOT the same if you go to another branch
unless servers exchanged some data at night.
Classic Example:
Early Banking Systems
The Obvious Future:
 Change the LAN to a wide area network

covering all the branches.


 Get rid of the individual servers at each branch

 Have clients connect to central server where

ALL the banking data is stored.


Classic Example:
Early Banking Systems
The Obvious Problems:
 Large banks could have thousands of tellers

connecting to the central server.


 Combining data from all branches requires

severs with lots of storage capacity.


 Branch data could be stored in different

formats.
 Lack of Standardization.
3-Tiered Systems
3-Tiered System
 Database Tier (Database Server)
 Data storage and low level data manipulation
 Server Tier (Application Server)
 Manage client connections and data processing
 Client Tier (Client Software installed locally)
 User interface and some data processing
Advantage of 3-Tier Systems
 Central Database Server accessed by multiple
Application Servers
 In turn, each Application Server could independently
manage thousands of users
 Database Server is specially designed to do its job
 Database Operations: Update, Insert, Remove, etc.
 Lots of disk storage and memory needed
 Application Servers can be added to support more
users or DIFFERENT APPLICATIONS
 Server Operations: Complex application-dependent
computations
 Lots of processor power needed
First Web Applications
 1993 – Rob McCool proposed a framework called
 CGI (Common Gateway Interface)
 Data passed from a web browser to the server
 GET - passed via URL variables
 POST - passed via HTML forms
 Web server daemon (httpd) could then make remote
system calls
 Example
 Web server could run a C++ program and write the output
to public HTML folder
 Web server would send response back with location of the
output.
Intro to HTML
Topic -2

Scripting : Client Side vs Server Side


Scripting Languages
 A scripting language is a programming language that
supports the writing of scripts

“A script is a program that automates the execution of tasks


which could alternatively be executed one-by-one by a
human operator”

 Where to use scripts?

Software applications(Php,Asp,Jsp,Python,Perl,etc)
Web pages (Javascript,VB script,php etc)
FEATURES
Ease of use: scripting languages are intended to
be very
fast to pick up

Interpreted from source code: to give the fastest


turnaround between the scripting phase and the
execution phase
EXECUTION
 Scripts are written and executed on-the-fly
Without compiling
Without linking

 Differences with the software environment code

Scripts are created and/or modified by the person who


executes them
Software code is compiled and distributed in machine code
form; the user does not access to it and modify it

 A script is used in order to extend application functionalities,


or to execute simple tasks by using pre-existing components
ADVANTAGES OF SCRIPTING
 Easy to learn and use
 Minimum programming knowledge or
experience required
 Allow complex tasks to be performed in
relatively few steps
 Allow simple creation and editing in a
variety of text editors
 Allow the addition of dynamic and
interactive activities to web pages
 Editing and running code is fast.
SCRIPTING

SCRIPTING

CLIENT- SEVER-SIDE
SIDE
SERVER SIDE SCRIPTING
Server side scripting is used to create dynamic
pages based a number of conditions when the
users browser makes a request to the server

The Web Server executes the server side


scripting that produces the page to be sent to the
browser.

 Server executes server-side scripts to send out a


page but it does not execute client-side scripts.
SERVER SIDE SCRIPTING
Server side scripting is used to connect to the
databases that reside on the web server.

Server side scripting can access the file system


residing at the web server.

Response from a server-side script is slower as


compared to a client-side script because the scripts
are processed on the remote computer.
Example
SERVER SIDE SCRIPTING-advantages
1. It does not require the user to download plugins like Java or
Flash (client-side scripting).

2. Your scripts are hidden from view. Users only see the HTML
output, even when they view the source.
Disadvantages
The scripts can be used by attackers to gain access
to the server. Because the scripts respond to URL
input, changing the URL to something that exploits a
security hole can give the user server access,
sometimes even as root.
CLIENT-SIDE SCRIPTING
 Client side scripting is used when the users
browser already has all the code and the page is
altered on the basis of the users input.

 The Web Browser executes the client side


scripting that resides at the user’s computer.
CLIENT-SIDE SCRIPTING
 The browser receives the page sent by the
server and executes the client-side scripts.

 Client side scripting cannot be used to


connect to the databases on the web server.

 Client side scripting can’t access the file


system that resides at the web server.
CLIENT-SIDE SCRIPTING
 The files and settings that are local at the user’s
computer can be accessed using Client side
scripting.

 Response from a client-side script is faster as


compared to a server-side script because the
scripts are processed on the local computer.

 Examples of Client side scripting languages :


Javascript, VB script, etc.
Example
Advantages of Client Side Script

•Allow for more interactivity by immediately responding to


users' actions
• Execute quickly because they don't require a trip to the
server
• May improve the usability of Web sites for users whose
browsers support scripts
•Can give developers more control over the look and
behavior of their Web widgets (note that this can be an
advantage or disadvantage)
•Can be substituted with alternatives (for example, HTML) if
users' browsers do not support scripts
Disadvantages of Client Side Script
1.Not all browsers support scripts, therefore, users might experience errors if no
alternatives have been provided.

2. Different browsers and browser versions support scripts differently, thus more
quality assurance testing is required.

3.More development time and effort might be required (if the scripts are not already
available through other resources).

4. Developers have more control over the look and behavior of their Web widgets;
however, usability problems can arise if a Web widget looks like a standard control
but behaves differently or vice-versa
Web Server
WEB SERVERS

Web Server Definition


 A Web server is a program that generates and
transmits responses to client requests for Web
resources.
 Handling a client request consists of several
key steps:
 Parsing the request message
 Checking that the request is authorized
 Associating the URL in the request with a file name
 Constructing the response message
 Transmitting the response message to the requesting client
WEB SERVERS

Web Server Definition


 The server can generate the response message
in a variety of ways:
 The server simply retrieves the file associated
with the URL and returns the contents to the
client.
 The server may invoke a script that
communicates with other servers or a back-end
database to construct the response message.
Web Server - Example
The URL

Where you place your web site

49
WEB SERVERS

Web Site versus Web Server


 Web site and Web server are different:
 A Web site consists of a collection of Web pages
associated with a particular hostname.
 A Web server is a program to satisfy client
requests for Web resources.
WORKING OF WEB SERVERWEB SERVERS
Steps in Handling a Client Request:-

 A Web server proceeds through the following


steps in handling an HTTP request:
 Read and parse the HTTP request message
for example GET the resource /foo.htm
 Translate the URL to a file name
for example the resource be located in the base directory
such as /www, where the URL
http://www.bar.com/foo/index.html corresponds to
the file of www/foo/index.html
 Determine whether the request is authorized
 Generate and transmit the response that includes
header to show the status information
A Web server communicating
with several HTTP clients
WEB SERVERS

Access Control
 A Web server may limit which users can access
certain resources. Access control requires a
combination of authentication and
authorization.
 Authentication identifies the user who originated
the request.
 Authorization determines which users have
access to a particular resource.
WEB SERVERS

AUTHENTICATION
 Most client-server systems authenticate a user by asking for
a name and password.

 Web server must perform authentication for every request


for a resource that has access restrictions.

 The server returns an HTTP response that indicates that the


request requires authorization.

 The response also identifies what kind of authentication is


required.
WEB SERVERS

AUTHORIZATION
 To control access to Web resources, the server must
employ an authorization policy.
 A policy typically expressed in terms of an access control
list that enumerates the users who are granted or denied
access to the resources.
 In addition to checking the user name, the server may
allow or deny access to the resource based on other
information associated with the HTTP request, such as
the host name or IP address of the requesting client.
 Authenticating HTTP requests can impose a heavy load
on the Web server.
Type of web servers:-

1.Local Web Server


2.Remote web Server
Personal Web Server (PWS)

Definition:- A personal web server is an appliance that


allows users to store and access private files remotely from
any device connected to the web. A personal web server
might just be an occasional user's computer loaded with the
requisite software for remote management or a dedicated
high-end computer with dedicated network hardware and
software. A personal web server is a primary example of e-
commerce application.
Microsoft Personal Web Server
Microsoft Personal Web Server (PWS) is a web server
software for Windows operating systems. It has fewer
features than Microsoft's Internet Information Services
(IIS) and its functions have been superseded by IIS and
Visual Studio. Microsoft officially supports PWS on
Windows 95, Windows 98, Windows 98 SE, and
Windows NT 4.0. Prior to the release of Windows 2000,
PWS was available as a free download as well as
included on the Windows distribution CDs. PWS 4.0
was the last version and it can be found on the

Windows 98 CD and the Windows NT 4.0 Option Pack .


Installing Personal Web
Server
STEP : 01
STEP : 02
STEP : 03
STEP : 04
STEP : 05
STEP : 06
STEP : 07
STEP : 08
Microsoft Internet Information
Server
Installation Steps
Diff between Pws & IIS
1. The difference between PWS and IIS is that PWS is for internal web services
only,you can only run pws on an intranet where as IIS is microsoft's full blown
web server and can work on Internet also.

2. A PWS is intended for Windows 95 or 98 or NT. The IIS is intended for latest
versions of Windows.

3. PWS was released in 1997 & IIS was released in 2000.

4. PWS lacks the logging in SQL/ODBC database,while IIS has the capability to
work with SQL.

5. PWS lacks performance-enhancing optimizations such as caching of


frequently used file handles,on the other hand IIS overcome this disadvantage.

You might also like