You are on page 1of 21

Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

Internet and Web Languages


1. Internet..............................................................................................................................2
1.1 Sharing of Information:........................................................................................2
1.2 Interconnection of Computers:..........................................................................2
1.3 Disparate Platforms and Technologies...........................................................2
1.4 Lots of Users.............................................................................................................3
1.5 Complex Applications............................................................................................3
1.6 Data Management...................................................................................................3
1.7 Information Retrieval............................................................................................4
1.8 Bandwidth & Speed................................................................................................4
1.9 Security of Data/Network....................................................................................4
2.0 Legal, Moral, and Ethical Aspects....................................................................5
2. Networks...........................................................................................................................5
2.1 Introduction:..............................................................................................................5
2.2 Hardware:..................................................................................................................6
2.3 Software:.....................................................................................................................6
2.4 Interface between Hardware and Software:................................................7
2.5 Protocols:....................................................................................................................7
2.6 Bandwidth / Speed:................................................................................................7
2.7 Conclusion:................................................................................................................7
3. Web Languages...............................................................................................................7
3.1 Introduction:..............................................................................................................8
3.2 AN OVERVIEW OF WEB LANGUAGES..........................................................8
3.2.1 Client-Server Relationships.........................................................................8
3.2.2 Markup Languages.......................................................................................10
3.2.3 DHTML..............................................................................................................11
3.2.4 Browser Differences.....................................................................................11
3.2.5 DHTML Concepts..........................................................................................11
3.2.6 Style Sheets.....................................................................................................12
3.2.7 Grouping Elements.......................................................................................12
3.2.8 DHTML References......................................................................................12
3.3 Properties of Web Languages..........................................................................13
3.4 Object Oriented Languages..............................................................................14
3.5 Client-Side Web Languages..............................................................................15
3.6 Server-Side Languages.......................................................................................16

Source: 1999 UW Computing & Communications & NMT Dept CS 1


Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

1. Internet
Objectives:
The Internet was conceptualized with two main objectives. They were:
 Sharing of information among computer users across the globe
 Interconnection of a wide variety of computers across the world

1.1 Sharing of Information:


The information to be shared could be of various forms starting from
plain text to sophisticated multimedia presentations containing a large
amount of audio and video contents. A brief classification of different
representations of information over the Internet is presented below :
 Text: The simplest way to share information is through text.
Example : Any written or typed word, presented in any format.
 Video: An ability to transmit full frame high quality video and audio
is an important requirement for effective information sharing.
Multimedia presentations are examples of this type of information
representation. Others representations of video information are
ASF, Real Player, AVI, MPEG .
 Audio: Along with video, audio plays an important role in
information sharing. Audio is still the easiest way to communicate
with people. Either through the telephone, or a simple talk with
someone. The internet provides means to send voice transmissions
digitally on the network. Common examples of audio information
over the Net are MP3, Real Player, WAV, MIDI, MOD, AU, SND
 Graphics: This type of information representation is one of the
most popular forms over the Internet. The ability to send high
quality pictures and diagrams over the internet is absolutely crucial
today. Some examples of this from are GIF, JPEG, BMP, PICT, TIFF.

1.2 Interconnection of Computers:


The second objective is to interconnect millions of users across the world
so that they can share information easily and quickly. This is an
interesting and extremely complex problem. The main reason for this is
an enormous amount disparity between the platforms used by users
across the world. There could be a disparity between hardware,
networking or software platforms or any combination of the above three.
Thus integrating all these disparate platforms and technologies becomes
the foremost challenge in the design and implementation of the web. In
order to handle all these disparities in information representation
and platforms the net must be equipped with tools and technologies.

1.3 Disparate Platforms and Technologies


Computers are manufactured by many different companies which each
have their own proprietary designs. Some examples of the more widely
used architectures include the Intel x86, Dec Alpha, Macintosh, Sun
Sparc, and HP systems. Since none of these designs function in exactly
the same way, it becomes difficult to write code that will work on every
kind of architecture. Not only do machine architectures differ, but the

Source: 1999 UW Computing & Communications & NMT Dept CS 2


Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

architectures of network hardware components differ as well. There are


routers, hubs, and switches designed by different companies that often
will act in very different ways. Internal networks could be using
Ethernet, SONET, ATM, and WDM, all of which use different kinds of
hardware architectures. One step up from the hardware layer, is the
operating system, which could be implemented in many different ways.
Operating systems such as Linux, Windows, HP-UX, and MacOS all
behave very differently. All of these factors combined make it very
difficult to deal with disparate platforms and technologies.
1.4 Lots of Users
There are many complications that arise due to the enormous growth and
use of the Internet. There has been a near-exponential yearly growth in
both the number of machines connected, and the number of users on the
Internet since its inception. Many of the users know little more about
computers than how to use a mouse. For this reason, it is necessary to
make the Internet easily accessible by anyone with the desire to. This
means that hardware and software must be able to support data transfer
across any medium necessary. Users need to be able to connect through
a phone line, satellite link, Ethernet connection, radio link, fiber optic
cable, or any other potential medium. The network itself must be able to
handle the routing of information from machine to machine. The
topology of the network must be able to withstand the demands of an
ever-increasing load. In short, methods are needed for connecting users
to the network, and connecting the network to other networks while
maintaining the primary goal: efficient throughput of information.

1.5 Complex Applications


The Internet is a very dynamic and unpredictable entity, the uses of
which are bounded only by human creativity. This makes dealing with
Internet applications and data increasing complex. Already, many
applications used in conjunction with the Internet are using data type
previously unheard of in the world of computer science. Video, audio,
and text are being used as commonly as the C int or Pascal var. There is,
however, no standard representation of these data types. There is the
need to have methods to deal with these kinds of data. There is also the
necessity to provide utilities and services that allow users to monitor,
access, and communicate through the network. Many Internet users
commonly use such tools as telnet, ftp, and email daily.

1.6 Data Management


 Data Representation
All data at the base level must be sent across the Internet as binary
sequences of numbers. This is the lowest level of abstraction in all of
computer science. The numbers themselves may be representing many
possible kinds of data. The most common type of data used on the
Internet is prominently text. However, to transfer text from one machine
to another machine that may have a different architecture, there needs to
be a common way to represent the text using only binary numbers. The
way this is done is by using a conversion table, or character map, to

Source: 1999 UW Computing & Communications & NMT Dept CS 3


Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

translate each letter or symbol into a number, these numbers then can
then be sent across to another machine to be read and interpreted as the
letters and symbols that they were originally written as. Other data
encodings must be used to send image, audio, and video data. The data
must be able to be read by any machine using the appropriate decoding
process regardless of the underlying architecture.
 Storage/Retrieval of Data
Having data alone is usually not enough for most users. In order to
organize and deal with large volumes of data or metadata, it is necessary
to have programs that arrange the data in some structured manner. In
most cases, some form of database does this job very effectively. The role
of the database is as an intermediary between some user or program and
the data. It provides organized storage and methods of retrieval that
allow the data to be accessed in many different ways. Writing specialized
queries can retrieve specific subsets of the data. This is mostly limited to
the text-based data, however; Most non-text data is simply treated as a
file.
 Data Manipulation
Another aspect of data management is data manipulation. Computer
scientists have been devising schemes to manipulate the bits and bytes of
data in a computer since before the first assembly language was ever
written. The idea is to use the data as input to a program and produce
some kind of output. In the context of the Internet, much of the data
manipulation by web languages is done to generate dynamic information
and content. Each language and class of languages behaves somewhat
differently in how they take input and what kind of output they can
produce. An often overlooked of data manipulation is the need to control
not only the data, but the network and network resources themselves
that make up the backbone of communication for the data to pass
through.
 Transferring Data
One of the most difficult, albeit important, aspects of data management is
the matter of how to relay the data from one computer to another across
the network. The data must pass from one machine to another
regardless of the architecture of the network(s) that the data may pass
through to reach its destination. Protocols for communication are
necessarily used by the client and server, or any other machine no matter
what network model is used. The client/server model is the dominant
network model used with the Internet, and the highest priority of the
protocols are to effectively allow the client and server to communicate.
The protocols define how data is sent between machines. They can range
in complexity from very simple to extremely sophisticated, but they are a
necessary ingredient for intercommunication.

1.7 Information Retrieval


With the sheer size of the Internet and the vast amount of information
available, it can become very difficult for users to find the specific
information that they are looking for. The dynamic nature of the Internet
and information accessible through the Internet adds complexity to an

Source: 1999 UW Computing & Communications & NMT Dept CS 4


Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

already difficult problem. Add to this the heterogeneous nature of the


information and information services and the task seems near
impossible. What is being attempted is a worldwide coordinated effort to
make available much of the knowledge ever known to man to anyone and
wishing to access it. To single out specific pieces of information among
this mass of data makes finding a needle in a haystack seem trivial.

1.8 Bandwidth & Speed


Associated with the problem of the number of users connecting to the
Internet, is the problem arising due to the finite amount of bandwidth
available for transferring data. Unlike other means of communication,
specifically telephone, there is no limit on the amount of bandwidth any
single machine can use. Internet Service Providers can place restrictions
on bandwidth use, but that is merely ignoring the true problem, not
solving it. The fact is that users are already overloading the Internet.
More and more users are transferring larger types of data over the
network every second. This often leads to a lot of congestion at many
points of high throughput on the network. The amount of Internet traffic
doubles approximately every six months, and usage patterns are
extremely difficult to predict due to their chaotic nature. Traffic
bottlenecks frequently occur at overloaded servers and routers. The
network is at a constant strain to relay all the data. This affects both
speed and the reliability of data transfers. Hardware can only move so
fast. Measures need to be taken at the software in order to ensure the
most efficient transfer of data.

1.9 Security of Data/Network


With any means of communication, security is necessary in order to
protect the privacy of the information being communicated. On a
network where every computer is basically made available for the entire
world to connect to it, there also need to be means to protect the
computer and the data from users with malicious intent and users
ignorant of their power to destroy important information. The transfer of
data through the network also needs to be private and secure. With the
incredibly growing trend of businesses and individuals doing e-commerce
online, the transactions need to be secure, and any information about the
transaction should only be between the parties involved. Users
downloading applications need to be protected from computer viruses.
Machines running foreign code need to be protected from harmful things
the code could do to the machine and its data. It is important to realize
that any packet of data sent through the network can potentially be
intercepted, and any machine connected to the network can potentially
be "hacked".

2.0 Legal, Moral, and Ethical Aspects


With all of the information being made freely available on the Internet,
many legal, moral, and ethical concerns arise. With so much information
so readily accessible, it becomes difficult to control ownership of
information. It becomes hard to lay claim to intellectual property rights

Source: 1999 UW Computing & Communications & NMT Dept CS 5


Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

for any kind of data. Encroachments made on copyright laws are difficult
to track. Illegally pirating of commercial software and any other kind of
data becomes increasingly easy. In countries where certain modes of
expression and information are prohibited from being viewed by the
public, it becomes difficult to restrict the inflow of information from the
Internet. It is near impossible to ensure that export-controlled data does
not cross country "borders". It is impossible to stop the wrong kinds of
information from getting into the wrong hands. When they say, "You can
find anything on the internet." they do mean anything. Detailed
instructions on how to make explosives, and adult-oriented mature
content which most families would not want their children to see are a
couple of examples of the kind of things that can be found on the
Internet. The Internet provides the perfect setting for people across the
world with similar interests to unite and pool together their knowledge
and resources.

With communication comes unity, with information comes knowledge and


from knowledge comes power. With power comes responsibility and this
responsibility cannot be neglected.

2. Networks
"Man is only man at the surface. Remove his skin, dissect, and
immediately you come to machinery."
--Valery

2.1 Introduction:
The domination of a single technology was one of the most
characteristics during the past three centuries. The 18th century was the
are where the mechanical systems push the industrial revolution to the
edge, the 19 century was the age of the steam engine. The 20th century
was the age of the information.
From gathering the information, processing and distribution of the
information, the invention of the means to handle this was a critical
demand till this time. Starting from connecting the telephone wires, the
radio, the television, the biggest jump was accomplished buy the
invention of the computer and the satellites.
The rapid progress of the technology shortens the distances and brings
to the world new measures and policies. The birth of the entity
-organizations, companies, institution, …- with a world spread existence
would not be possible without the progress of the computers merging
with the communication.
The computer network, which means the interconnection of a
collection of autonomous computers independently from the other aspect
of distributed systems, is the subject of our concern. A step furthers the
fast development of the computer end up with the generation of the
monster of the Internet. At this time the dealing with the communication
becomes much trivial than the Internet, which introduces a new aspect of
networking and new issues. With the networks over the Internet will

Source: 1999 UW Computing & Communications & NMT Dept CS 6


Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

discover the connecting mediums, the protocols governing the


connection and more concerning the other aspects of networking.

2.2 Hardware:
Well the first thing is to create the physical connection between
computers. On an individual scale this may consist of a single user using
a phone line and modem to call another computer which is either the
final destination that the user wants, or having the computer dial into a
computer which is connected to a Local area network which has the
destination that the user wants to go to.
On a much larger scale, say a corporation who has headquarters in
both the United states and in Japan, and they wanted to be able to link
the two networks together, they would need a little more hardware. Most
likely some sort of satellite receiver/transmitter station at each network.
This would then allow the VP of the US branch to be able to directly
connect with the VP at the branch in Japan. Basically the hardware is just
a way to branch the old existing LANs, MANs, and WANs together.
As you can see just the physical connection starts out fairly small, but
as more and more users start to become connected, the job of the servers
and routers to route the information to the correct computer becomes
more and more of a problem. This is also when efficiency starts to
become a problem. Here's an example of what I mean. Consider user "A"
wants to communicate with user "B". Seems fairly straight forward, just
go from this computer to this computer in this order. However what is to
stop the network from routing user "A's" stuff from his computer all the
around the network before coming to little old user "B". Although there is
a physical connection to another computer in many different ways, there
is no guarantee that the data will go in the most efficient way.
The one nice thing though about this model, is that if one connection
gets severed, the whole network will not go down. This is a key element
in creating the internet. It has to be redundant.

2.3 Software:
This is just the start of a network. Now that we have a physical
connection between computers we will need to define some sort of
standard in communication.
There are so many different types of machines on this network, there
has to be a common way for each one to communicate. That way a
computer which represents an "A" on one computer when it comes across
the network it will also represent an "A" on that computers. Or likewise if
a picture is sent on one computer the same picture should come out on a
computer running something totally different.
We think of this as a standard that everyone on the internet has to
follow. That is the data that actually gets sent on the network will follow
a certain pattern. For our purposes we will say the network is able to
send binary (1's and 0's) on the network. So for anyone to be able to send
this information on the network, they will first have to break down there
information into the correct representation. This can be dealt with in two

Source: 1999 UW Computing & Communications & NMT Dept CS 7


Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

ways, first you could have a single computer ( or network of computers)


on the internet changing each piece of data that a particular computer
wants to send to the correct format for the destination computer to use.
This was causes a lot of overhead and is very impractical. What is a much
easier way for the communication to work is that each computer has a
translator on there computer (hardware or software) which converts the
information into the correct standard then sends it off to the destination.
In turn the destination computer would then have the translator turn the
standard format back into a readable format by his or her computer. By
creating a communication in this way, every different type of architecture
and operating system would be able to communicate.

*Mention Segmented Packets, More web languages to make it easier to


establish and share information.

2.4 Interface between Hardware and Software:


But, what do we mean when we say an interface driver ``handles'' or a
device? The driver has to be able to communicate with the peripheral's
on-board logic somehow: it has to send commands and data to the board,
while the board should deliver any data received to the driver. In PCs,
this communication takes place through an area of I/O-memory that is
mapped to on-board registers and the like. All commands and data the
software sends to the hardware -board- have to go through these
registers.

2.5 Protocols:
At some point we would like to send data from point to another,
regardless for the hardware there are many others constraint interfere to
establish and complete the communication. In order to handle the variant
codification. At this level the standardization of some measures -as ISO
Model- to govern the communications and regulate the transformations
of data from a network to another was a necessity. A packet of data
issued to the transportation medium if may need a reformatting at some
point when it leaves the Local network before joining another. Say a
packet from Token Bus to an Ethernet 10BaseT. The device responsible
for handling this conversion is a switch.

2.6 Bandwidth / Speed:


Internet traffic continues to grow exponentially conservative estimate
indicates that it'll double every six months. With this growth rate the
aggregate bandwidth required for the Internet in the US will be around
35 terabits/ second by 2001-2002.
Given the increasing demand for high bandwidth requirement in the
coming years a large part of the debate is centered around the
appropriate technology that will be used for delivering bandwidth -ATM,
SONET/ SDH or WDM optical networks.
The appropriate technology choice will be largely driven by the
characteristics of future applications. Many people feel that interactive

Source: 1999 UW Computing & Communications & NMT Dept CS 8


Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

real time multimedia will be the driving application for high bandwidth
networks. Some examples of this are tele-immersive virtual reality, 3D
interactive gaming, distance education and tele- medicine. If these
applications do become the dominant IP applications then there is no
question that there will be a demand for large bandwidth networks.

2.7 Conclusion:
There are now three guarantees in life: death, taxes, and the demand for
more bandwidth. The increased consumption of bandwidth by businesses
and individuals is not a new revelation. But the rate at which demand for
this commodity is growing is unprecedented and changing the entire
complexion of the telecommunications infrastructure.
It's amazing to think that less than 20 years ago, the majority of
communications traffic was voice-related and carried over analog
transmission facilities. Electro-mechanical switching systems routed the
majority of analog voice traffic. As the telecommunications industry grew
and evolved in the 1980s, digital telephony and lightwave systems began
to play significant roles in the advancing transmission and switching
systems.

3. Web Languages
"The tie of language is perhaps the strongest and the most
durable that can unite mankind."

--Alexis de Tocqueville

3.1 Introduction:
One of the most recurrent ideas we have mentioned in our writings about
the internet is the central theme of communication. The reason the
internet was first developed was to speed up and improve communication
in the scientific community. Since the dawn of human intelligence,
language has been our primary means of communication. Language in
the context of computer science, and specifically in the context of the
internet is somewhat different, but is intrinsically the same. Its base
purpose is to convey information. Computer languages are primarily
useful for manipulating data to perform some computation and return
some output. Similarly, web languages are used for the expression of
computer programs that display information, automate web pages, create
dynamic information, and link web pages to other applications. Their
usefulness for web designers and programmers is infinite.
In the following sections, material will be presented which should help
clarify the usefulness of web languages. Several principals will be
introduced which should govern not only the web languages that exist
today, but also those of the future. These principals serve as a base of
what kind of functionality should be inherent in any programming
language used with the internet. Since there are so many different uses
languages have on the internet, we will define a level of abstraction
which should generalize all languages to fit into one of the following
classifications: Markup Languages, Scripting Languages, and (compiled)

Source: 1999 UW Computing & Communications & NMT Dept CS 9


Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

Networking Languages. We will give examples of such languages and


describe how they operate as well as provide several (internet and
printed) resources for web languages.

3.2 AN OVERVIEW OF WEB LANGUAGES


The World Wide Web has already become a major element in all of our
lives. It has grown rapidly in both volume and capabilities. In particular it
has become much more flexible and interactive, mainly due to the use of
computer languages which control the operation of browsers and
servers. This class discusses the role of these languages.
What You Will Learn
Specifically, this class presents these languages in terms of:
 What they can do
 Why they are used
 What they are suited for
 Where they live
 How they are invoked
The main topics covered include:
 Client-Server relationships for the WWW
 Markup Languages
 Properties of WWW languages
 Client-Side languages
 Server-Side languages
And along the way we will discuss such topics as HTML, DHTML,
HTML4, XML, XSL, Cascading Style Sheets, Clients/Servers, compilers,
interpreters, Object-Oriented Programming, JavaScript, JScript,
VBScript, Java, CGI, Perl, "Here-documents", Server-Side Includes, and
"GET" and "POST" methods.

3.2.1 Client-Server Relationships


The relationship between client and server is the fundamental paradigm
that determines the characteristics of computer languages on the web.
The differences are played out in terms of:
 How the languages are invoked
 What resources and information they can access
 What structures can be manipulated
 How they interact with the user and system
 The speed and predictability of their interactions
 How the languages are invoked: server side languages live on the
server and are typically invoked either by
o a user pressing a submit button in the client browser HTML
which transfers control to the server program along with any
name-value pairs in the form associated with the submit
button. Here is an simple example of such an HTML program
and here is the simple server program that is executed by it
o a user typing in a URL with the name of the server program
optionally followed by a "?" and "name=value" parameters
separated by "&"s. For example,
http://site.location.type/my.cgi?p1=abc&p2=10
Source: 1999 UW Computing & Communications & NMT Dept CS
10
Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

o a user clicking on a #exec Server Side Include element in


HTML which points to a server program
In contrast, client side programs are initially stored on the server
embedded in the HTML code but are transferred to the client browser
and operate there for the remainder of the session. They may be
activated just by the loading process, by "onLoad" commands, or by user
actions such as moving or clicking the mouse.

 What resources they can access: server side programs operate as


normal user programs unless web administrators have imposed
restrictions. Thus they can access all user programs, such as
graphics and databases, system programs, Unix system variables,
and a special set of variables associated with the web, including a
limited amount of browser information.
In contrast, client-side programs are almost entirely confined
to the browser, except for accessing images and other client side
scripts from the server, and cookies. However, they have almost full
access to the structure and operation of the browser.

 What structures can be manipulated: server side programs can


manipulate any resources on the server that are accessible to any
user program, and can also write (but not change) HTML (including
embedded scripts), plain text, and images to the browser.
In contrast, client-side programs can not manipulate anything
on the server (they can read images and scripts but cannot write or
change anything), or the client (except for cookies), except for the
browser, where they have a great deal of control

 How they interact with the user and system: server side programs
cannot manipulate any information on the client browser: they can
rewrite a browser image, but they cannot modify an existing one
(although they can change the contents of graphic files)
In contrast, client programs interact easily with the user, and in
the case of DHTML, can move, modify, add, or replace virtually
anything in the browser

 The speed and predictability of their interactions: server side


programs can only rewrite a browser page, not change anything on
it, so interactions often require a good deal of modem traffic and are
subject to the varying loads placed on the server
In contrast, client programs can manipulate HTML elements down to
the smallest level and are affected only by the activity on the client.
Thus interaction is usally very swift, immediate, and predictable.

3.2.2 Markup Languages


Markup languages, such as HTML, DHTML, HTML4.0, XML, XSL, and
CSS (Cascading Style Sheets) have a major effect on the role of web
languages (see this for details). As these markup languages develop they
give more and more power to the client side web languages, such as

Source: 1999 UW Computing & Communications & NMT Dept CS 11


Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

JavaScript and Java. We can roughly characterize each markup language


as follows:
 HTML (less than version 4.0): a language that is concerned almost
wholly with appearance (such as: place a table here, put an image
there, color this text blue, make text this size, place a form there)
rather than content. While client side languages can perform many
useful functions, such as data verification or image animation, many
HTML elements cannot be manipulated

 DHTML (Dynamic HTML): this exposes nearly all of the HTML


elements to manipulation by client side languages, so images, text,
tables, etc. can move, change, and otherwise respond to user input
with immediacy and speed. IE 4/5/6 have a very good implementation
of DHTML, whereas Netscape lags way behind. It is possible to
implement a fair amount of DHTML that is compatible with both
browsers, but that requires a well-developed API package

 HTML 4.0: a standard that implements most of the DHTML found in


IE 4, IE 5, and IE 6, along with a number of additional features, such
as better scroll-ability in tables, accessibility features for the
handicapped, UniCode for international languages, enhanced
multimedia elements. Netscape 6 is said to be fully compliant.

 CSS: Cascading Style Sheets make possible the "D" in "Dynamic"


HTML (more on this below).

 XML: the newest markup language (see this for more details). Unlike
HTML which is concerned with appearances only, XML (eXtensible
Markup Language) is concerned almost wholly with content as
opposed to form. Thus the tags identify information that is relevant
to a particular discipline. For example, the following XML might
appear in medical applications:
<patient>
blah blah blah
<birthdate> blah </birthdate>
<sex> blah </sex>
<drug history>
blah blah blah
<drug allergies>
blah bah blah
</drug allergies>
</drug history>
<admissions>
blah blah blah
</admissions>
</patient>

Source: 1999 UW Computing & Communications & NMT Dept CS


12
Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

Tagging information this way has many advantages: client side


languages will have much more information that they can
manipulate in meaningful ways, such as listing all patients who are
allergic to a specific drug, or tallying admissions for a certain
hospital during a given time period. The combination of this
tagging information and a client language should greatly enhance
interaction, reduce the load on the Internet (since most
interactions take place on the client) and make information much
more retrievable. It appears to be the future for the web. XML is
available in IE 5, IE 6, and Netscape 6.

 XSL: just as XML is almost wholly concerned with content , XSL is


mostly concerned with the appearance of XML documents. By
separating the content and the appearance, XSL makes it easy to
render the XML document in many different formats, such as text,
images, speech, or control over equipment.
 XHTML is essentially HTML 4 which conforms to the very strict
syntax required by XML. For example, all beginning tags must have
ending tags, so that <p> must be balanced by an </p> tag, and all
tags must be lower case. Following such rules greatly increasing the
portability of your HTML code. See XHTML 1.0 for details.

3.2.3 DHTML
Here is a more complete description of DHTML. DHTML stands for
"Dynamic HTML". It is currently a leading edge development and, as
such, suffers from a lack of standards and very different
implementations. Its goal is to allow you to manipulate every element of
an HTML page though script languages, such as JavaScript.

The coming standard HTML 4.0 should solidify the standards so that the
differences between browsers are not so large and the elements are
stable. HTML used to be a very simple language, but no longer: the
reference guide for HTML in one publication is now 670 pages long.

3.2.4 Browser Differences


The differences between Netscape 4 and IE 4/5/6 are relatively modest
until you use DHTML, in which case the differences are profound. IE
4/5/6 are far more DHTML capable than Netscape 4 and IE 4/5/6 are
much closer to the emerging standards of HTML 4.0. If you write DHTML
for Netscape you can usually (with some difficulty) convert it to IE 4/5/6,
but going the other way around is almost hopeless as there are so many
elements in IE 4/5/6 that have no counterpart in Netscape.

There are several ways to write DHTML that is compatible with both
browsers:

Source: 1999 UW Computing & Communications & NMT Dept CS


13
Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

 You can use the "Navigator" object to detect the type of browser and
then branch to different pages depending on which browser and
version it is
 You can switch to different sections within a page depending on
which browser it is
 You can develop an applications interface (API) which fields generic
calls and then selects the implementation based on which browser
has been selected. Here is a snippet of code taken "Dynamic HTML"
by Danny Goodman that does this.

Because Internet Explorer (IE) is much more developed in this area and
is much closer to the emerging standard, we will only show DHTML for
IE.

3.2.5 DHTML Concepts


The main concepts you need to learn for DHTML are Style Sheets,
named grouping elements, and DHTML references

3.2.6 Style Sheets

Style sheets let you define a set of characteristics for a group of HTML
elements, such as color, font, position, and visibility. There are a large
number of style sheet elements, a number of ways of incorporating Style
Sheets, and a huge number of ways of applying them. For our purposes
we will confine Style Sheets to the format and content as shown in the
following example:

<HTML>
<HEAD>
<STYLE TYPE="text/css">
#imageA {position:absolute; left:50;
top:150; width:120; z-index:100}
#mytext {border:solid blue 5 px;
color:green; background-color:coral}
#otherImage {position:absolute;
visibility:hidden}
</STYLE>
</HEAD>
...
</HTML>

3.2.7 Grouping Elements


Like Style Sheets, there are innumerable ways to define and manipulate
groups of elements, but for our purpose we will confine our choice to
two: the DIV and the SPAN elements. DIV surrounds a complete set of
elements (images, text, bullet lists, etc. and any combination of such) and
gives it a name so the set can be manipulated as a whole. SPAN lets us
delineate any section of the page, even inside a single element. Examples
include:
Source: 1999 UW Computing & Communications & NMT Dept CS
14
Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

...
<DIV NAME=my_text >
Now is the time for all good men to come
to the aid of their party.
<IMG SRC="my.gif" >
</DIV >

Here is <SPAN ID=brash>very bold</SPAN> text

3.2.8 DHTML References


The last crucial step in using DHTML through JavaScript is knowing how
to reference objects and events. The following table contains the few that
we need to know for the examples that follow (in the table the term "obj"
or "object" means the name of a specific object and not the literal word
"object"):

window.event.srcElement =obj activated by event


obj.parentElement.style =container of object
window.event.clientX [Y] =coord of event wrt window
window.event.offsetX [Y] =coord wrt container
obj.pixelLeft =left pixel coord of obj
obj.pixelTop =top pixel coord of object
document.all.obj.style =the css part of object
document.onmousedown =fcn when mouse is down
document.onmousemove =fcn when mouse moves
document.onmouseup =fcn when mouse is up

For example,
 var my_image = window.event.srcElement
If an event occurs, such as a mouse passing over an image or a piece
of text, this returns the object activated by the event, for a GIF
image.

 obj = my_image.parentElement.style

This returns the container of the object activated by the event. For
example, if a GIF image named "my_image" is contained in a DIV
element with an ID = XYZ, then a pointer to XYZ is returned by this
command.

 if (obj == document.all.imageA.style)
dbg.document.write(" Selected Container for imageA)
This tests to see if "obj" is "document.all.imageA".

Examples of DHTML

 Simple manipulation of text and an image.


 Creating a pathway.

Source: 1999 UW Computing & Communications & NMT Dept CS


15
Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

3.3 Properties of Web Languages


The most frequent languages used on the web are JavaScript, JScript,
VBScript, and Java on the client side, and Perl, Python, Rexx, C, and C++
on the server side. The client side languages all have counterparts on the
server side as well, but we will consider only their client side
implementations. The main division lines among languages that we will
consider are:
 Compiled languages
 Interpreted languages
 Object Oriented languages
Compiled languages: Java, C, and C++. These languages are "typed"
languages in that every identifier is assigned a fixed data type. The
compiler scans the entire program and then writes machine language (or
in the case of Java, writes to a virtual machine) to implement the
operations. The key feature is that this code is generated before the
program sees any data and will fail if the data is not of the expected type.
Consider the following code embedded in a loop:
...
int a, b, c;
...
a = b + c;
...
The compiler requires that "b" and "c" contain integer numbers. But
suppose you assigned strings, or lists, or matrices to these identifiers?
The program would simply process them as if they were integers and
give absurd results or crash. With compilers you bind the instructions to
the machine before you see the data.
 Interpreted languages: JavaScript, JScript, VBscript, Perl, Rexx,
Python. These languages are (at least in principle) executed line by
line as the data flow in. So if "b" and "c" are strings, it looks at the
data and says, "Oh, lets interpret + to mean concatenation", whereas
in the next turn through the loop, if "b" and "c" are linked lists, it
generates the instructions to add one list to another, and so on.
Which is better? Compiled languages are usually much faster in
execution (except Java which is about 10 times slower than C because it
has the intermediate step of virtual machine-to-real machine translation).
They also provide very powerful syntax checking capabilities which let
you detect many errors at compile time which can be much, much easier
to debug than runtime errors. So they are best for large programs which
process lots of data, and especially for programs designed by teams of
people.
Interpreted languages are often easier to write as you don't have to pre-
specify data types in advance and you can fling any data at it with
aplomb (check out this for examples of the flexibility of JavaScript).
However, they are slower and don't provide the powerful syntax checking
capabilities of compiler languages and so are better suited to small
programs created by one person where runtime errors are easier to find.

Source: 1999 UW Computing & Communications & NMT Dept CS


16
Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

3.4 Object Oriented Languages


The best known Object Oriented Languages (OOL) are JavaScript,
JScript, VBscript, Java, and C++, although Perl 5 features OOL
properties, as do newer versions of REXX and Python. Object oriented
languages are a whole new programming paradigm. Instead of
concentrating on the "processes" that are to be performed, you
concentrate on the "classes" and "classes-of-objects" that make up the
entities that are manipulated by your program. The main goals of Object
Oriented Programming (OOP) are to:
 Identify classes that group similar entities together
 Create objects from the classes, using the
new Class()
syntax

 Populate the classes and objects with variables and functions (called
"methods") which describe their behavior
The following analogy might be helpful. Consider a large sheet of dough,
and suppose you have a number of cookie cutters in various shapes, such
as a Christmas tree, Donald Duck, a GingerBread man, and so on. Each
cookie cutter represents a class, and each time you stamp out a shape
with the cookie cutter you generate a new object of that class. All of the
objects in a class (all the pieces of dough stamped out with the same
cookie cutter) have similar properties, in that they share the shape of the
cookie cutter, but might also have individual properties, such as green
sprinkles versus blue sprinkles. So objects in a class share certain major
characteristics in common, but allow for individual variation as well.
You determine the classes you use based on your purposes. For example,
suppose you are developing a web-based system to keep track of people
in your department, and suppose, for the purposes of the program, that
students, staff, and faculty must be treated in very different ways. Then it
makes sense to setup your classes to reflect this natural division, as
follows:

// Define the classes----------------


function Student(year,major,..) {
...
}
function Staff(classification, ...) {
...
}
function Faculty(tenure, research,...) {
...
}
...
// Create the objects for these classes -
for (i = 0; i < n_Students; i++) {
student[i]=new Student(2,class[i],...)
}
Source: 1999 UW Computing & Communications & NMT Dept CS
17
Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

for (i = 0; i < n_Staff; i++ ) {


staff[i]=new Staff(pos[i],...) {
}
for (i = 0; i < n_Faculty; i++) {
faculty[i]=new Faculty(type[i],...) {
}
The parameters you pass to the functions that define the class supply
some of the values that define the object. In addition, you may add
functions and other variables both to the classes and to individual objects
to further describe their behavior.
On the other hand, you may decide that, for you specific purposes, staff
and faculty should be treated alike, whereas students are to be treated
differently. In that case, your division might be FacStaff versus Student.
Procedure oriented programmers may have a difficult time making the
transition to OOP, especially as OOP usually takes more time in the
design phase, and the solutions are often more general then they need
be. But the code is usually much more reusable, robust, and easier to
modify and extend.
Object Oriented languages are particularly important for the WWW
because its very structure lends itself well to that approach. Here is a
very simplified outline of the structure of a web page:
 Window: the top of the hierarchy
o navigator: contains information on the browser and the client
o event: contains information on mouse/other events
o frames: these are declared with the "frameset" HTML code
o document: contains the main content of a window
 all: in IE4 this accesses all style sheet elements
 body: the main body of the document
 forms: container for all forms elements
elements: text, buttons, select-one, etc
 images: all images declared with <IMG SRC...>
Most of the operations on HTML elements make use of this hierarchical
structure where each element that is manipulated, be it window,
document, form, image, button, or text box is an object that belongs to a
class.
See this for an example of generating and manipulating simple objects, in
this case a user-defined object named "Rect", and a window and two
element objects. The "Rect" object has two data attributes "height" and
"width" and two "method" (function) objects named "area" and "perim":
here is a picture of the "Rect" object. See this for a much more complex
example of how objects are defined and used. In this case, each visible
icon on the screen is an object which has both data and methods
(functions) defined for it.

3.5 Client-Side Web Languages


Many languages can live on either side of the Client/Server divide, but
we will consider only the client-side versions of JavaScript, JScript,
VBScript, and Java. These languages might be described as follows:

Source: 1999 UW Computing & Communications & NMT Dept CS


18
Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

 Specific language characteristics: from many standpoints, JavaScript,


JScript, and VBscript can all be considered as a single type, in that
they are all interpreted languages that usually reside inside an
HTML script. JavaScript and Jscript (Microsoft's variant) are almost
identical, and while VBscript has a very different syntax, that of
Visual Basic, it performs the same operations on basically the same
types of objects in the web browser. Java, however, is a very different
language. JavaScript/JScript/VBscript are NOT simple forms of Java,
nor are they simple languages (especially JavaScript and JScript).
They share a certain superficial similarity in syntax and concepts
with Java, but differ in many ways. Although they are much smaller
languages than Java, they posses some subtle concepts that often
accompany interpreted languages. JavaScript was initially known as
LiveScript until its name was changed for marketing reasons.

 Invocation: JavaScript, JScript, and VBscript are typically stored


inside the HTML code as plain text segments inside special tags, and
are transferred from the server to the client browser when the HTML
is invoked through a URL. At that point they may simply start
executing (even before the rest of the HTML is loaded), may execute
when directed by an "onLoad" directive, or may be invoked by
mouse, scroll, or keyboard actions by the user.
Java Applets are also loaded from the server when the HTML is
invoked by the URL, but the code that is loaded is not plain text: it
consists of precompiled "class" files. And the activation is done
through special applet tags of the form <APPLET >. These forms
contain parameters which you can use to tailor the operation of the
applet. Once invoked, the applet can present you with various HTML
elements, including buttons, as well as highly interactive graphics.
Like JavaScript, once loaded the applet runs only on the client. See
this for a sample Java Applet.
 Characteristics: they run on the client, are very fast and responsive
(once loaded), they have an intimate knowledge of the browser
environment (see this for an example taken from Goodman's
JavaScript book which manipulates all possible HTML form
elements), and (under DHTML) can manipulate nearly all of its
elements. See this for an example of very fast and responsive
animation.
 Limitations: they have very limited access to the server, and little
access to the client machine itself, except for cookies. See this for a
simple example of cookies, and this for a more comlex and useful
example.

3.6 Server-Side Languages


Server side languages for the web operate as CGI (Common Gateway
Interface) programs. CGI is not a language itself but rather is a protocol
for communicating between the server and the client web browser. This
protocol can be implemented by many languages, of which the most
common are Perl, C, C++, various Unix scripts, Rexx, and Python. Perl is
Source: 1999 UW Computing & Communications & NMT Dept CS
19
Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

by far the most widely used at present. These languages might be


described as follows:

 Specific language characteristics: Perl is an interpreted language


which is especially good for "Here Documents", Regular expressions,
associative arrays, and easy access to the operating system. "Here
documents" are useful because CGI programs typically write other
programs, either in the form of HTML or embedded HTML scripts,
such as JavaScript. They let you enclose entire HTML/SCRIPT
programs without any modifications between start and end lines of
the form:
print <<ANY_END_STRING
blah blah blah
...
ANY_END_STRING

(see this for an example of a "Here" document which prints out a


program for a Gnuplot graph). The only exceptions are a few special
characters, such as "\n" or "\t" often found in JavaScript which need to be
doubled, e.g., "\\n" or "\\t".
Regular expressions are difficult to get used to but once learned make it
very easy to locate and/or modify text strings, and associative arrays let
you locate and manipulate arrays by easily understood text indices,
rather than numbers, e.g., $phone_number{"John Jones"} is much more
understandable than $phone_number{273}.

Perl 5 also has some Object Oriented capabilities.

C and C++ are also widely used but are compiled languages and lack the
regular expressions and "Here documents" that are so useful in Perl.

 Characteristics in common: these languages live entirely on the


server. They can receive information from the client, usually by way
of the Submit button which transfers control and the name-value
pairs in the form to the server, and they can rewrite HTML client side
pages and send them to the client, but they cannot modify anything
on the client, except for rewriting the page.

 Invocation: you can invoke them through a URL, and can pass
parameters to them though the URL followed by "?
p1=value&p2=value&p3=value" (the GET method: see this for a very
simple example of a CGI program invoked by typing a URL into a
browser, and this for a more complex example). The most usual way
is by pressing the submit button associated with a form which
transfers control to the CGI program along with the parameters in
the form. You can also invoke them through the #exec Server Side
Include function in HTML scripts whose file extension reads .shtml
as opposed to just .html (see this for an example, and see this for the
source code)
Source: 1999 UW Computing & Communications & NMT Dept CS
20
Prepared by V.Radha
Post Graduate Program in Banking Technology @IDRBT Session 9 - Financial Networks

 Advantages: access to the same environment on the server machine


that any user program has, except when specifically restricted by the
Web administrators. Thus all programs, files, graphics (see this for an
example of a Gnuplot CGI file), databases, environmental variables,
and system calls, accessible thru any normal program are available.
In addition, there is information associated with the Web interface,
and a small amount of information (such as supported MIME types
and the browser name/ version) about the client browser.

 Disadvantages: these languages cannot *change* anything on the


client: they can only *re-write* web pages which they transmit as a
whole. Also, the speed and uniformity of response is lacking, since
communication is thru modem or E-net, and the load on the server is
varying (see this for an example as well as instructions for typing in a
URL which implements animation. Although this method works, the
animation is rather slow and jerky, and is useless over a low speed
line since the images don't appear to be cached. When this is called
through a SUBMIT button using client-pull animation the animation
is constantly interrupted by requests to repost the data).

 Mixing client and server side scripts: you can fairly easily combine
client and server (CGI) scripts to work together. Here is an example
of JavaScript program that writes HTML which lets you to specify the
locations of people, but which calls a CGI Program to make those
changes permanent

Source: 1999 UW Computing & Communications & NMT Dept CS


21
Prepared by V.Radha

You might also like