CH2 WEB Lecture
CH2 WEB Lecture
CHPTER 2:
UNDERSTANDING THE ELEMENTS OF A WEB BASSED
APPLICATION
Examples:
– Code that runs on the server that interprets every mouse
move and keystroke is clearly undesirable
terminal to mainframe paradigm
– On the other hand, one does not want to download an
entire product database to a browser and then run code that
searches for the products.
– Server side forms have direct access to active code and
perform more reliably
– On the other hand they are more prone to slowdowns due
to the server/network congestion
Client Side vs. Server Side Web
In general, the key areas where client-side coding has advantages stem from its
location on the user desktop and/or other end device. They include the
following:
Key server-side strengths include stem from their proximity to the backend
business databases and other applications. They include the following:
Java Applets:
– small programs written in Java, embedded in an
HTML page and executed from within a browser
– Unlike JavaScript, the Java code must be pre-
compiled into a so-called bytecode before it can
be interpreted by a browser’s so–called Java
Virtual Machine
– In other words, the Notepad and the browser
alone are not enough to write java applets
Client Side Technologies
ActiveX controls
– Similar to Java Applets but can be written in a
variety of programming languages such as C, C+
+, VB and even Java
– Supported by Windows only
– Security issues: unlike Java applets, ActiveX
controls have full access to all desktop resources:
memory, operating systems, …
Authentication and registration system
Client Side Technologies
Macromedia Flash
– Proprietary commercial application for creating
interactive graphic content
– It has its own scripting language
– To reproduce the Flash content browsers must be
equipped with a Flash Player plug-in
Client Side Technologies: summary
Microsoft ASP/.NET
Java server technologies such as J2EE, JSP, and servlets
CGI / Perl- Common Gateway Interface
PHP – Hypertext Preprocessor
ColdFusion
Server Side Technologies
WEB BROWSERS
INTRODUCTION
1. User Interface
• this includes the address bar, back/forward button ,
bookmarking menu etc
2. Rendering Engine
• Rendering, that is display of the requested contents on the
browser screen.
• By default the rendering engine can display HTML and
XML documents and images
HISTROY
The history of the Web browser dates back in to the late
1980s, when a variety of technologies laid the
foundation for the first
29
WEB SERVERS
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
30
WEB SERVERS
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.
31
WEB SERVERS
32
WEB SERVERS
Access Control
A Web server may limit which users can access
certain resources. Access control requires a
34
WEB SERVERS
AUTHENTICATION
Most client-server systems authenticate a user by
asking for a name and password.
AUTHORIZATION
To control access to Web resources, the server must
employ an authorization policy.
36
WEB SERVERS
37
WEB SERVERS
Server-Side Include
A server-side include instructs the Web
server to customize a static resource based
38
WEB SERVERS
Server Script
A server script is a separate program that generates
the request resource.
39
WEB SERVERS
Server Script
The server can interact with the script in
several different ways:
Separate process invoked by the server
Software module in the same process
Persistent process contacted by the server
40
WEB SERVERS
41
Client‐Side Scripting
JavaScript
ActionScript (used to create animated interactive web
applications for Adobe Flash Player using Adobe Flash
Pro)
Dart
VBScript (NOTE: VBScript can also be used as Server-
side so that processing is done on the server.)
Typescript
Python
JavaScript
JavaScript (JS) is
dynamic computer programming language.
It is most commonly used as part of web
browsers, whose implementations
allow client-side scripts to interact with the
user, control the browser, communicate
asynchronously, and alter the document
content that is displayed.
Interactive Web Applications