Transcript Intro. WWW
An Introduction to WWW
Technology
Yelena Yesha
Olga Streltchenko
1
Presentation Overview
The Internet
Client/Server Architecture
World Wide Web
HTML, URLs, HTTP
Downloaded and Mobile Code
CGI
Scripting languages (JavaScript/JScript,
VBScript)
2
Presentation Overview (cont'd)
Java
Java Applets
Java Servlets
Microsoft Active Platform (ASP, ActiveX)
Java Server Pages
Thin Clients
Application Servers
XML
3
The Internet
The Internet is a vast interconnected collection of
computer networks of many different types.
Large distributed system;
Enables user to employ services like World Wide Web, Email,
ftp, etc.;
The set of services can be extended.
ISP
Provides connection to individual users and organizations
enabling them to access services via the Internet;
Provides local services, like Web hosting.
4
Intranets
• A portion of the Internet that is separately
administered and has a boundary that can be
configured to enforce local security policies;
• Connected to the rest of the Internet via a
router;
• Employ firewalls to prevent unauthorized
access from outside;
Go beyond password protection by disabling an entire
class of services (ftp, telnet) for all but specified IP
address. Passwords are still required.
5
Intranets (cont’d)
Linked together by backbones.
Backbone
A network link with a high transmission capacity,
employing fibre optics and other high-bandwidth
circuits.
6
Client/Server Architecture
The terms “Client” and “Server” can be
applied to both computer programs and to
machines.
Server provides services like receiving and
executing instructions, sending results.
s processes, objects
Server runs continuously, waiting for clients’
requests. s processes, objects
7
Typical Client: Web Browser
Displays files for reading
Downloads as needed
Sends requests (filenames) and processes
responses (file contents)
8
Typical Server: Web Server
Listens for and fulfils requests from Web
browsers
Basic activities:
receive simple URL specifying an HTML file;
locate the file locally;
return to requesting browser.
9
World Wide Web
WWW is an application of the Internet.
Evolving system for publishing and accessing
resources and services across the Internet.
Open system: can be extended and implemented in
new ways without disturbing its existing functionality;
Moved beyond simple data resources to encompass
services, like electronic purchasing of goods.
10
HTML
HyperText Markup Language.
Used to specify the text and images that make
up the contents of a web page, and to specify
how they are formatted for presentation to the
user.
The set of markups (tags) is fixed.
11
HTML Tags
Tags come either singly or in pairs:
<HR>
<TAG>Some text here</TAG> (Tags are case
insensitive)
12
Physical Markup Tags
They change the physical appearance of the
text directly -- the WWW browser has no
influence over the typeface used,
Section titles/headers; use H1 through H6 tags:
<H1>Big and Bold Header</H1>
<H2>Slightly Smaller Header</H2>
Also, H3, H4, H5 and H6
Font styles
<B> Bold </B>
<I> Italics </I>
<U> Underlined </U>
<TT> are in Typewriter font </TT>
13
Logical Markup Tags
They give a specific reason for changing the
appearance of text -- it is up to the browser to
decide in what fashion to change the
appearance.
<EM> Emphasized </EM> : Emphasized
<STRONG> Strong </STRONG> : Strong
<CODE> some code </CODE> : some code
<CITE> citation </CITE> : This is a citation
14
Document Structure
Document Structure
<HTML> This surrounds the entire document and
lets the browser know what language is being
used (<SGML> might also be used)
<HEAD> This surrounds the header portion of the
document. Title is within the head as well.
<TITLE> The title of the document as shown in
the title bar of the WWW browser.
<BODY> The main body of the document
15
Example
<HTML>
<HEAD>
<TITLE> Title of Page </TITLE>
The Header of the document.
</HEAD>
<BODY>
The Main body of the document
</BODY>
</HTML>
16
Linking WWW Pages
HTML pages on the Web are linked to one another.
The basic tag for hypertext is called the Anchor
Anchors can be
the starting point for a link: a name proceeded by a #;
the destination (path) of a link.
A URL is placed in the HREF portion of the Anchor tag
The HREF can be either a Relative:
<A HREF =
"http://www.cs.umbc.edu/~streltch/myfile.html”> This
is a relative reference </A>
or Absolute reference:
<IMG SRC=“picture.gif" ALIGN=LEFT>
right, middle, top, bottom
17
Linking WWW Pages (cont’d)
Good design practice is to use absolute
referencing.
This enables portability of the entire site.
18
URLs
Uniform Resource Locator.
Identifies a resource in such a way as to
enable the browser to locate the resource on
the Internet.
Has two top-level components:
scheme:scheme-specific-location
Scheme declares which type of URL it is:
mailto, ftp, http, nntp, telnet.
Only schemes sanctioned by W3C.
19
URLs (cont’d)
HTTP URLs:
http://servername[:port][/pathNameOnServer][/arguments]
Domain Name Service (DNS) name;
Optional path name of the server resource;
Arguments, like query to a search engine.
Pathname conventions:
~streltch refers to subdirectory public_html of
user streltch’s home directory;
A pathname that end in a directory name rather
than a simple file refers to a file index.html in this
directory.
20
URIs
Uniform Resource Identifier.
URLs are a subset of URIs.
URIs can take any access method (schemes),
i.e. not necessarily established
Can define your own access method:
Mysecrets:mysecrets_location.
21
HTTP
HyperText Transfer Protocol.
Request-reply protocol.
main method of transfer used by Web protocols to
transfer data between a server and client.
understands URLs.
intended for hypertext/hypermedia environments.
Stateless
Cookies –later.
22
HTTP Cookies
HTTP designed to be stateless
Web sites want to save client associated session
information
Solution: cookies
small amounts of data save by the Web server and
retrieved later from the client system;
normally used by CGI and related server-side code.
23
HTTP Cookies (cont’d)
Managed by Web browsers, normally stored in
database or one or more files.
Implemented via 2 new HTTP headers: Cookie
and Set-Cookie.
Cookie transaction initiated by the server asking
the client to save a cookie.
If willing, client saves the data.
Later, browser returns data when visiting the
site.
24
The Common Gateway
Interface : CGI
Static pages
same each time visited unless the file is modified on the
server.
Many WWW sites are dynamic, i.e., the contents
change each time we visit.
Need to search, fill out questionnaires, order things
from catalogs.
Need two pieces:
HTML language to create Forms
Common Gateway Interface (CGI) to process the forms.
CGI is a way to pass information from a WWW
browser to a program for further processing
25
CGI (cont’d)
CGI programs are run on the servers to
generate content for their clients.
Application specific functionality
E.g., DB connectivity, etc.
Can parse the arguments that the client
provides.
Produce content of the required type
Usually HTML text.
26
Downloaded code
Web design requires service-related code to
run inside the browser
at the user’s computer.
Solution: Scripting
added to HTML documents;
expands static HTML to include client-side
interactivity;
inserted into HTML document using script
language tag.
27
Mobile Code
Downloaded code is a subset of mobile code.
Code that can be sent from one computer to
another;
e.g., Java applets.
The advantage of running downloaded code is
network delay avoidance during interactions.
Potential security threat to the local resources.
28
Scripting Languages:
JavaScript
A scripting language developed by Netscape to
enable Web authors to design interactive sites.
Developed independently from Java.
Can interact with HTML source code, enabling
Web authors introduce dynamic content.
It is supported by recent browsers from
Netscape and Microsoft,
Internet Explorer supports only a subset,
which Microsoft calls JScript.
29
Scripting Languages: VBScript
Microsoft proprietary scripting language
operations identical to JavaScript/JScript;
syntax familiar to Visual Basic users;
grew out of Visual Basic.
Visual Basic is component-based:
a program is built by placing components
onto a form;
then using VB to link them together.
30
Scripting Languages: VBScript
(cont'd)
Visual Basic Control (VBX)
VBXs shared a commmon interface that allowed them
to be placed on a VB form.
The main difference between VB and VBScript is
security
VBScript has no functions that interact with the host
file system.
31
Scripting languages and Java
A script-enhanced page gives immediate
feedback to the user
Use to check forms before sending them to the
server, update the web-page without reloading, etc.
JavaScript/JScript has limited functionality;
increasingly a thing of the past;
Wide divergence between Netscape and Microsoft
standards;
While Java has become uniform and stable.
Solution: Java applet
small, platform-independent programs that run
within the context of a browser’s HTML document.;
add dynamic information to the static document. 32
Java
A high-level programming language developed
by Sun Microsystems.
Java is an object-oriented language.
Java source code files (files with a .java
extension) are compiled into a format called
bytecode (files with a .class extension), which
can then be executed by a Java interpreter.
33
Java (cont'd)
Compiled Java code can run on most
computers .
Java interpreters and runtime environments=
Java Virtual Machines (VMs),
exist for most operating systems.
Bytecode can also be converted directly into
machine language instructions by a just-intime compiler (JIT).
34
Java Virtual Machine (JVM)
An abstract computing machine.
JVM is a platform-independent programming
language that converts Java bytecode into
machine language and executes it.
35
JVM (cont'd)
Mimics a real Java processor, enabling Java
bytecode to be executed as actions or
operating system calls on any processor
regardless of the operating system.
e.g., establishing a socket connection from a
workstation to a remote machine
involves an operating system call.
JVM translates the programming code so that the
two machines that may be on different platforms are
able to connect.
36
Java for WWW
Java applets have a number of features that
make them well suited for use on the World Wide
Web.
Java applets
small Java applications that can be downloaded from a
Web server and run on the user's computer by a Javacompatible Web browser.
37
Java applets
Stored on server, downloaded by web client
using HTTP.
Applets need to be embedded in another
application, normally an HTML document and
run by a Java-enabled Web browser.
Applets have a restricted security context,
cannot access the client’s system, and can
talk only with the server that hosted it.
38
Java Servlets
An applet that runs on a server
runs within a Web server environment.;
analogous to a Java applet that runs within a Web
browser environment.
Java servlets are becoming increasingly
popular as an alternative to CGI programs.
39
Java Servlets vs CGI
A Java applet is persistent;
once it is started, it stays in memory and can fulfill
multiple requests.
A CGI program disappears once it has fulfilled
a request.
The persistence of Java applets makes them
faster
Don’t need to initiate a new process for each
request.
40
The Microsoft Active Platform
Standard-based software architecture for
developing Internet applications;
‘open’, according to MS.
Tools:
HTML;
Scripting (JScript, VBScript);
Components (Java or ActiveX).
On the client machine: Active Desktop.
On the Web server: Active Server.
41
The Microsoft Active Platform
(cont’d)
Encompasses related technologies:
Object Linking and Embedding (OLE);
Component Object Model (COM);
Distributed COM (DCOM);
Windows Distributed interNet Application
Architecture (Windows DNA);
Active Desktop;
Active Server.
42
OLE
Clipboard metaphor for sharing data across
applications.
Dynamic Data Exchange (DDE) protocol as an
extension of the Clipboard functionality.
Slow and unreliable.
OLE replaced DDE.
Object-oriented technology that enables development
of reusable software components.
OLE architecture allows application to use shared
objects that provide specific functionality.
Text docs, charts, spreadsheets, email messages, graphics,
etc.;
When linked appear to be within the client application;
When clicked on, starts the application that created it.
43
COM
Developed to provide seamless object integration.
Allows functional components that provide specific
services to be created and plugged from one application
into another;
Component objects idea.
Component Object Model is an object-based model
consisting of
Specs that define the interface between objects within a
system;
Inplementation (packeged as DDL- Dynamic Linked Library).
44
COM (cont’d)
Establishes a connection between a client
application and an object and its associated
services.
Provides a standard method for
finding and installing objects;
communication between the client and the
component.
Provides a binary interoperability standard.
45
DCOM
Provides a distributed component-based
computing environment
Implements location transparency for the
client.
Replaces interprocess communication
between the client and the component
with an appropriate network protocol.
46
Windows DNA
An upward-compatible extension of COM.
Integration of PC and the Internet.
Defines a common set of services
Components;
Scripting;
Transactions;
Message queuing;
Security;
Directory and system management;
User interface;
DB and data access.
47
Active Desktop and Active
Server
Active desktop=operating system-independent client
Part of Internet Explorer;
but can be componentized, i.e. integrated within other
client applications.
Active server is based on open standards and
protocols
Provides a way to integrate the Web and legacy
applications.
Includes several core components
Active Server Pages;
Active Data Objects (discussed later in course);
others.
48
Active Server Pages
A specification for a dynamically created Web page
with a .ASP extension that utilizes ActiveX scripting
ActiveX=a set of scripting technologies based on
OLE and DCOM paradigms
Provides native support for VBScript or JScript.
When a browser requests an ASP page, the Web server
generates a page with HTML code and sends it back to
the browser.
Provide CGI functionality, but
enable Visual Basic programmers to work with
familiar tools.
Run in-process with the server, multi-threaded
Don’t need to initiate a new process for every request.
49
Java Server Pages
An extension to the Java servlet technology
a server-side technology;
not restricted to any specific platform or
server;
developed by Sun as an alternative to
Microsoft's ASPs (Active Server Pages).
JSPs have dynamic scripting capability that
works with HTML code,
separates the page logic from the static
elements
the actual design and display of the page.
50
Thin Client
A client designed to be especially small so that
the bulk of the data processing occurs on the
server.
Industry divide
A group led by Netscape and Sun Microsystems
advocating Java -based thin clients running on
network computers.
Microsoft and Intel are pushing ever-larger
applications running locally on desktop computers.
51
Thin Client (cont'd)
The term thin client usually refers to software.
Increasingly used for computers,
such as network computers and Net PCs, that are
designed to serve as the clients for client/server
architectures.
A thin client is a network computer without a hard
disk drive, whereas a fat client includes a disk drive.
52
Application Servers
A program run on a mid-sized machine that
handles all application operations between
browser-based computers and a company's
back-end business applications or databases.
The application server works as a translator for
another application, e.g. a database,
allowing, for example, a customer with a
browser to search an online retailer's
database for pricing information.
53
Typical Application Server:
ColdFusion
ColdFusion
A product created by Allaire Corporation of
Cambridge, Mass.
includes a server and a development toolset
designed to integrate databases and Web pages.
Example: a user could enter a zip code on a Web
page, and the server would query a database for
information on the nearest movie theatres and
present the results in HTML form.
54
ColdFusion (cont'd)
Cold Fusion Web pages include tags written in Cold
Fusion Markup Language (CFML) that simplify integration
with databases and avoid the use of more complex
languages like C++ to create translating programs.
55
Extensible Markup Language
(XML)
A means for defining tags to encapsulate information.
A subset of SGML;
Provides syntactic interoperability:
Need to know the price – look inside the <price> tag.
Still lacking semantic interoperability
How do I know that you and I mean the same thing by
price?
Coming soon: Semantic Web (discussed later in
course).
56