Sunday, December 10, 2023

Web Technology and Design

                    Internet Principles


In 1984 William Gibson in his sci-fi novel Neuromancer coined the term Cyberspace. It refers
to the non-physical terrain created by computer systems. Online systems, for example, create a
cyberspace within which people can communicate with one another (via e-mail), do research, or
simply window shop. Like physical space, cyberspace contains objects (files, mail messages,
graphics, etc.) and different modes of transportation and delivery. Unlike real space, exploring
cyberspace does not require any physical movement other than pressing keys on a keyboard or
moving a mouse. Some programs, particularly computer games, are designed to create a special
cyberspace, one that resembles physical reality in some ways but defies it in others. In its ex-
treme form, called virtual reality, users are presented with visual, auditory, and even tactile feed-
back that makes cyberspace feel real. The dreams of William Gibson is becoming a reality in the Internet world.

1.1 Introduction to Internet

A network of computers refers to a group of computers connected with each other as per a topol-
ogy. The computers in a network are capable of sharing the resources among themselves, the
resources such as memory, peripherals, etc. They communicate with each other in a defined way.
Internet refers to a global network connecting millions of computers. More than 100 countries
are linked into exchanges of data, news and opinions. Unlike online network services, which are
centrally controlled, the Internet is decentralized by design. Each Internet computer, called a
host, is independent. Its operators can choose which Internet services to use and which local
services to make available to the global Internet community. Remarkably, this anarchy by design
works exceedingly well. There are a variety of ways to access the Internet. Most of the Internet
users gain access through a commercial Internet Service Provider (1SP) as illustrated in Figure
1.1. Usually we connect our Home PC to the Internet through the landline telephone connection


using a device called modem as shown in Figure 1.2. So, the following two factors decide the
characteristics of the Internet services.

1 modem
2 Connectivity for communication
1.1.1 Modem
A modem (short form of modulator-demodulator) is a device that enables a computer to trans-
mit data over, for example, telephone or cable lines. Computer information is stored digitally,
whereas information transmitted over telephone lines is transmitted in the form of analog waves.
A modem converts between these two forms.
Fortunately, there is one standard interface for connecting external modems to computers
called RS-232. Consequently, any external modem can be attached to any computer that has an
RS-232 port, which almost all personal computers have. There are also modems that come as an
expansion board that you can insert into a vacant expansion slot. These are sometimes called
onboard or internal modems.
While the modem interfaces are standardized. a number of different protocols for formatting
data to be transmitted over telephone lines exist. Some, like CCITT V.34, are official standards,
while others have been developed by private companies. Most modems have built-in support for
the more common protocols-at slow data transmission speeds at least, most modems can
communicate with each other. At high transmission speeds, however, the protocols are less
standardized.
Characteristics ofa Modem
Aside from the transmission protocols that they support, the following characteristics distinguish
one modem from another:
1. Speed of transmission
Internet Principles 3
At slow rates, modems are measured in terms of baud rates. The slowest rate is 300 baud (about
25 characters per secondcps). At higher speeds, modems are measured in terms of bits per sec-
ond (bps). A fast modem transmits at 57,600 bps, although they can achieve even higher data
transfer rates by compressing the data. Obviously, the faster the transmission rate, the faster you
can send and receive data. Note, however, that you cannot receive data any faster than it is being
sent. If, for example, the device sending data to your computer is sending it at 2,400 bps, you
must receive it at 2,400 bps. It does not always pay, therefore, to have a very fast modem. In
addition, some telephone lines are unable to transmit data reliably at very high rates.
2. Modes supported
Many modems support a switch to change between voice and data modes. In data mode, the
modem acts like a regular modem. In voice mode, the modem acts like a regular telephone.
Modems that support a voice/data switch have a built-in loudspeaker and microphone for voice
Communication.
3. Aut0-answer
An aut0-answer modem enables your computer to receive calls in your absence. This is only
necessary if you are offering some type of computer service that people can call in to use.
4. Data compression
Some modems perform data compression, which enables them to send data at faster rates. How-
ever, the modem at the receiving end must be able to decompress the data using the same compression technique.


5. Flash memory
Some modems come with flash memory rather than conventional ROM. which means that the
communication protocols can be easily updated if necessary.
6. Fax capability
Most modern modems are fax modems, which means that they can send and receive faxes
1.1.2 Connectivity for Communication
Connectivity is considered to be the backbone of the Internet world. Apart from ordinary tol
ephone line we are also using broad band connectivity such as ISDN connections.
1.1.3 Standards of Data Communication
The CCITT (Comité Consultatif International Téléphonique et Télégraphique ) is an organiza-
tion that sets international communications standards. It has developed the X.400 standard
which attempts to provide a universal way of addressing messages. To date, though, the de facto
addressing standard is the one used by the Internet system because almost all e-mail systems
have an Internet gateway.
CCITT has defined many important standards for data communications, including the
following:
Group 3: The universal protocol for sending fax documents across telephone lines. The
Group 3 protocol specifies CCITT T.4 data compression and a maximum transmission rate
of 9,600 baud. There are two levels of resolution: 203 by 98 and 203 by 196.
Group 4: A protocol for sending fax documents over ISDN networks. The Group 400
protocol supports images of up to 400 dpi (dots per inch) resolution.
V.21: The standard for full-duplex communication at 300 baud in Japan and Europe. In the
United States, Bell 103 is used in place of V.21.
V.22: The standard for half-duplex communication at 1,200 bps in Japan and Europe. In the
United States, the protocol defined by Bell 212A is more common.
V22bis: The worldwide standard for full-duplex modems sending and receiving data
across telephone lines at 1,200 or 2,400 bps.
V.29: The standard for half-duplex modems sending and receiving data across telepnone
lines at 1,200, 2,400, 4,800, or 9,600 bps. This is the protocol used by fax modems.
V.32: The standard for full-duplex modems sending and receiving data across phone ines
at 4,800 or 9,600 bps. V.32 modems automatically adjust their transmission speeds base on the quality of the lines.
V.32bis: The V.32 protocol extended to speeds of 7.200, 12,000, and 14,400 bps.
V.34: The standard for full-duplex modems sending and receiving data across phone lineS
at up to 28,800 bps. V.34 modems automatically adjust their transmission speeds based on
the quality of the lines.
V42: An error-detection standard for high-speed modems. V.42 can be used with digital
telephone networks. See MNP for a competing standard.
VA2bis: A data compression protocol that can enable modems to achieve a data transter
rate of 34,000 bps.
The standard for full-duplex modems sending and receiving data across phone lines
at up to 56,600 bps.
X.25: The most popular packet-switching protocol for WANs.
X400: The universal protocol for e-mail. X.400 defines the envelope for e-mail messages
so all messages conform to a standard format.
X.500: An extension to X.400 that defines addressing formats so all e-mail systems can be
linked together.
1.1.4 ISDN Connections
ISDN is the abbreviation of integrated services digital network, an international communications
standard for sending voice, video, and data over digital telephone lines or normal telephone
wires. ISDN supports data transfer rates of 64 Kbps (64,000 bits per second). Typically an ISDN
connection has some Bearer-channels (B-channel) which are the main data channel and some
Delta-channels (D-channel ), the channel that carries control and signaling information
There are two types of ISDN as shown in Table 1.1.1.
1 Basic Rate (BRI) ISDN that consists of two 64-Kbps B-channels and one D-channel for
transmitting control information.
2 Primary Rate ISDN. In the United States of America and a few other countries this type of
ISDN consists of 23 B-channels and one D-channel. In the Europe these have 30 B-channels and one D-channel.The original version of ISDN employs baseband transmission. Another version, called B.
ISDN, Uses broadband transmission and is able to support transmission rates of 1.5 MBPS. B-
ISDN requires fiber optic cables and is not widely available at present. The baseband and
broadband transmission are discussed in section 1.1.6.
1.1.5 DSL (Digital Subscriber Lines) Connection
DSL is the acronym for Digital Subscriber Lines. DSL technologies use sophisticated modula-
tion schemes to pack data onto copper wires. They are sometimes referred to as last-mile tech-
nologies because they are used only for connections from a telephone switching station to a
home or office, not between switching stations. DSL is similar to SDN in as much as both oper-
ate over existing copper telephone lines and both require the short runs to a central telephone
office (usually less than 20,000 feet). However, DSL offers much higher speeds-up to 32 Mbps
for upstream traffic (client to server), and from 32 Kbps to over 1 Mbps for downstream traffic
(server to client).
There two main categories being
0 Asymmetric digital subscriber line (ADSL)
Symmetric digital subscriber line (SDSL)
Depending upon the speed some also classify as follows:
High-data-rate DSL (HDSL)
Very high DSL (VDSL).
Asymmetric Digital Subscriber Line (ADSL)
Asymmetric digital subscriber line is a new technology that allows more data to be sent over
existing copper telephone lines. ADSL supports data transfer downstream rate from 1.5 to 9
Mbps and upstream rate from l6 to 640 Kbps. ADSL requires a special ADSL modem. ADSL is
growing in popularity as more areas around the world gain access to Internet.
Symmetric Digital Subscriber Line (SDSL)
Symmetric digital subscriber line is a technology that allows more data to be sent over existing
copper telephone lines. SDSL supports data rates up to 3 Mbps. SDSL works by sending digital
pulses in the high-frequency area of telephone wires. Since these high frequencies are not used
by normal voice communications, SDSL can operate simultaneously with voice connections over
the same wires. SDSL requres a special SDSL modem. SDSL is called symmetric because it
supports the same data rates for upstream and downstream traffic. ADSL is more popular in
North America, whereas SDSL is being developed primarily in Europe. A comparison of ADSL
and SDSL is shown in Table 1.1.2.

1.1.6 Broadband and Baseband Transmissions

Broadband transmission is a type of data transmission in which a single medium (wire) can carry
several channels at once. Cable TV, for example, uses broadband transmission. In contrast,
baseband transmission allows only one signal at a time.
Most communications between computers, including the majority of local-area networks use
only baseband communications. An exception is B-ISDN network., which employ broadband
transmission.
1.2 Client Server Model
Internet works in a client server model. This section throws some light on the servers that are
used in the marketplace today. Server Platforms refers to the operating system that drives the
Server.
1.2.1 Application Servers
Application Servers are the type of middleware, which occupy a large chunk of computing terri-
tory between database servers and the end user, and they often connect the two.
1.2.2 Audio/Video Servers
Audio/Video Servers bring multimedia capabilities to Web sites by enabling them to broadcast
streaming multimedia content.
1.2.3 Chat Servers
Chat Servers enable a large number of users to exchange information in an environment similar
to Internet newsgroups that offer real-time discussion capabilities.
1.2.4 Fax Servers
Fax Servers are ideal solution for organizations looking to reduce incoming and outgoing tel-
ephone resources but that need to fax actual documents.
8 Web Technology anu
1.2.5 FTP Servers
FTP Servers serve one of the oldest Internet services. It makes it possible to move one or more
files securely between computers while providing file security and organization as well as trans-
fer control.
1.2.6 Groupware Servers
A groupWare server is a software designed to enable users to collaborate, regardless of location
Via the Internet or a corporate intranet and to work together in a virtual atmosphere.
1.2.7 IRC Servers
IRC Servers provide an option for those seeking real-time discussion capabilities, Internet Relay
Chat consists of various separate networks (or "nets) of servers that alloW users to connect to
each other via an IRC network.
1.2.8 List Servers
List servers offer a way to better manage mailing lists, whether they be interactive discussions
open to the public or one-way lists that deliver announcements, newsletters, or advertising.
1.2.9 Mail Servers
Mail servers move and store mail over corporate networks (via LANS and WANs) and across the
Internet.
1.2.10 News Servers
News servers act as a distribution and delivery source for the thousands of public news groups
currently accessible over the USENET news network.
1.2.11 Proxy Servers
Proxy servers sit between a client program (typically a Web browser) and an external server
(typically another server on the Web) to filter requests, improve performance, and share
connections.
1.2.12 Web Servers
A web server is a computer system (Hardware and software) that delivers (serves up) Web pages.
Every Web server has an IP address and possibly a domain name. For example, if you enter theURL http: //www.stxaviers.com/index. html in your browser, this sends a request to the
server whose domain name is stxavier. com.
index. html and sends it to your browser.
The server then fetches the page namned
Any computer can be turned into a Web server by installing server software and connecting
the machine to the Internet. There are many Web server software applications, including public
domain software from NCSA and Apache, and commercial packages from Microsoft, Netscape
and others.
1.3 Protocol
A protocol is a program written as per mutually accepted standard that two computers use to
communicate with each other. Computers use protocols (protocol programs) to format
consistently their messages so that other computers can understand them, acknowledge the
receipt of messages, indicate that they are finished sending a message and so on. In the network
when one computer requests for the service of another, it is called a client. In order to establish
the needed connectivity, both the client machine and the server machine must have a common
protocol program. This is illustrated in Figure 1.3.

In short a protocol is an
protocol determines the following:
agreed-upon format for transmitting data between two devices. The
Server
the type of error checking to be used
data compression method, if any
how the sending device will indicate that it has finished sending a message
how the receiving device will indicate that it has received a messageThere are a variety of standard protocols from which programmers can ch0ose, Each has na
ticular advantages and disadvantages; for example, some are simpler than others, some are mo
reliable, and some are faster.
From a user's point of view, the only interesting aspect about protocols is that your compite.
or device must support the right ones if you want to communicate with other computers Th
protocol can be implemented either in hardware or in software.
Some standard protocols used in networks are listed below:
1. Simple Mail Transfer Protocol (SMTP)
2. Post Office Protocol version 3 (POP3)
3. Point to point Protocol/Serial Line Interface Protocol (POP/SLIP)
4. Transmission Control Protocol/Internet Protocol (TCP/IP)
5. Hyper Text Transfer Protocol (HTTP)
6. File Transfer Protocol (FTP)
7. Internet Mail Access Protocol (IMAP)
8. Internet Relay Chat (IRC)
9. Network News Transfer Protocol (NNTP)
10. Telnet
11. Gopher
12. Light weight Directory Access Protocol (LDAP)
1.3.1 Simple Mail Transfer Protocol
Simple Mail Transfer Protocol is used for sending e-mail messages between servers. Most e-
mail systems that send mail over the Internet use SMTP to send messages from one server to
another; the messages can then be retrieved with an e-mail client using either POP or IMAP. I
addition, SMTP is generally used to send messages from a mail client to a mail server. This is
why you need to specify both the POP or IMAP server and the SMTP server when you configure
your e-mail application.
1.3.2 Post Office Protocol (POP )
Post Office Protocol is a protocol used to retrieve e-mail from a inail server. Most e-mail appil
cations (e-mail client) use the POP protocol, although some can use the newer protocol Sucn a
IMAP (Internet Message Access Protocol). There are two versions of POP. The first, callee
POP2, became a standard in the mid-80's and requires SMTP to send messages. The newer Ve
sion, POP3, can be used with or without SMTP.
1.3.3 TCP/IP on the Internet
TCP/IP is the widely accepted protocol used in the networks. It is a protocol suite that consists
of several protocols including two primary protocols, Transmission Control Protocol (TCP) and
Internet Protocol (IP). The TCP/IP Protocol (protocol program) works asynchronously to handle
multiple message traffic simultaneously from multiple sources to multiple destinations as shown
in Figure 1.4. TCP (TCP Protocol program) handles the data integrity. It makes sure data gets to
the destination without errors. TCP is also responsible for disassembling and assembling the
data. It divides large messages into smaller packets of at the most 15 KB size. Each of this packet
1S called a segment. TCP numbers these segments and hands over to the IP. IP is the Protocol
(protocol program) that controls how data moves around on the network. After TCP divides the
message into segment, IP labels them with source and destination. These packets are now called
IP Datagrams. IP also takes care of sending the datagrams by determining the route. These
datagrams may hop several networks before reaching the destination.
At the destination the IP verifies the labels and passes them to the TCP. The TCP (at the des-
tination) checks if all the segments have been received. If any of the segments are missing it
informs this to the source TCP and requests the segment to be sent again. It is called retry. After
verification, the TCP assembles the message from these data segments and supplies to the destination program.
Packet Switching (Routing)
Routing (Packet Switching) refers to the job of transferring the data packets (IP datagrams) to an
appropriate computer. A special computer that does routing is called router. We have already
seen that Internet is a network of networks. So when a packet of data (IP datagram) starts from a
computer, it is submitted to the router of the network to which the computer belongs to. The
router verifies the IP address of the destination. The destination network may not be directly
reached. The router finds the next network to which the datagram must be submitted and does it.
Similarly the datagram passes several routers and finally reaches the final destination network.
Every router uses routing tables and routing algorithms to accomplish the job.
A
The routing algorithm will choose the next network to which the datagram may be routed de-
pending upon the data traffic and the shortest route. Datagrams of the same message may travel
through different routes to reach the final destination. But finally the TCP protocol takes care of
verifying if all the datagrams have reached. For example, suppose a Computer C1 in network A
wants to communicate with a Computer C2 in network F as shown in Figure 1.5.
When a message has to be sent from A to F, the message is disassembled into IP datagrams.
Some datagrams may travel in the path C1ACDFC2 whereas some may travel through
CIABEFC2. However, C2 verifies if all the datagrams have reached. Then it assembles the
sage and supplies to the application program in C2.
Tracing the Route (Tracert Command)
type
munication in a Network
In Windows or Windows NT when we are connected to Internet we can see the route from our
computer to any Internet host. This is got by the tracert command in command prompt. In Win.
dows NT, first open the DOS cmd prompt by running cmd command. In the DOS cmd promp"
tracert<doma in>
the rnes-
For example, we can type tracert Isu.edu
Router
A router is a special computer that manages the traffic from network to network. The router de-
termines the path of travel for a datagram in TCP/IP. Routers keep track of the next computer to
which the datagram has to hop. They use routing tables and routing algorithms to do routing.
In Windows NT, we can see the IP address of the router in our network by running the
WINIPCFG.EXE program. When we run the program click more info and then select PPP
Adapter in the dropdown 1list. In the middle of the dialog box the IP address of the router is
shown in the field Default Gateway. This is the IP address of the router to which your computer
will send a TCP/IP datagram when it is addressed to a computer that is not on your local net-
work. This is illustrated in Figure 1.6.

1.3.4 HyperText Transfer Protocol (HTTP )

HyperText Transfer Protocol is the underlying protocol used by the World Wide Web. HTTI
defines how messages are formatted and transmitted, and what action Web servers and browser
should take in response to various commands. For example, when you enter a URL in you
browser., this actually sends an HTTP command to the Web server directing it to fetch and trans
mit the requested Web page. The other main standard that controls how the World
works is HTML, which covers how Web pages are formatted and displayed.
Wide We
HTTP is called a stateless protocol because each command is executed independently, witho
any knowledge of the commands that came before it. This is the main reason that it is difficult
implement Web sites that react intelligently to user input. This shortcoming of HTTP is bei
addressed in a number of new technologies, including ActiveX, Java, JavaScript and cookies.

1.3.5 File Transfer Protocoi (FTP)
File Transfer Protocol or FTP, is a protocol used to upload files from a workstation to
server or download files from a FTP server to a workstation. It is the way that files get trans-
ferred from one device to another in order for the files to be available on the Internet. Wher
appears in a URL it means that the user iS connecting to a file server and not a Web server and
that some form of file transfer is going to take place. Most FTP servers require the user to loe
to the server in order to transfer files.
In contrast, Hyper Text Transfer Protocol, or HTTP, is a protocol used to transfer files froma
Web server onto a browser in order to view a Web page that is on the Internet. Unlike FTP
where entire files are transferred from one device to another and copied into memory, HTTP
only transfers the contents of a web page into a browser for viewing. FTP is a two-way system
as files are transferred back and forth between server and workstation. HTTP is a one-way sys-
tem as files are transported only from the server onto the workstation's browser. When httn
appears in a URL it means that the user is connecting to a Web server and not a file server. The
files are transferred but not downloaded, therefore not copied into the memory of the receiving
device.
1.3.6 Wireless Application Protocol (WAP)
Wireless Application Protocol defines a secure specification that allows users to access Internet
information instantly via handheld wireless devices such as mobile phones, pagers, two-way
radios, smartphones and communicators. WAP supports most wireless networks. WAP is sup-
ported by all operating systems. Ones specifically engineered for handheld devices now include
PalmOS,. EPOC, Windows CE, FLEXOS, OS/9, and JavaOS. WAPs that use displays and access
the Internet run using microbrowsers. Microbrowsers are browsers with small file sizes that can
accomnodate the low memory constraints of handheld devices and the low-bandwidth con-
straints of a wireless-handheld network.
Although WAP supports HTML and XML, the WML language (an XML application) is spe-
cifically devised for small screens and one-hand navigation without a keyboard. WML is scal-
able from two-line text displays up through graphic screens found on items such as smart phones
and communicators. WAP also supports WMLScript. It is similar to JavaScript, but makes mini-
mal demands on memory and CPU power because it does not contain many of the unnecessary
functions found in other scripting languages. Because WAP is fairly new it is still an initiative
that was started by Unwired Planet, Motorola, Nokia, and Ericsson.
1.3.7 Bluetooth
Bluetooth refers toa short-range radio technology aimed at simplifying communications among
Net devices and between devices and the Internet. It also aims to simplify data synchronizationbetween Net devices and other computers. Products with Bluetooth technology must be quali-
fied and pass interoperability testing by the Bluetooth Special Interest Group prior to release.
1.3.8 Simple Object Access Protocol (SOAP)
Simple Object Access Protocol proposed by Microsoft provides a way for applications to com-
municate with each other over the Internet. indenendent of platform. Unlike I1OP, SOAP piggy
backs a DOM onto HTTP (port 80) in order to penetrate server firewalls, which are usuaiy
COnngured to accept port 80 and port 21 (FTP) requests. SOAP relies on XML to define the Tor-
mat of the information and then adds the necessary HTTP headers to send it.
1.3.9 Internet Inter-ORB Protocol (I1OP)
Internet Inter-ORB Protocol is a protocol developed by the Object Management Group (OMG)
to implement CORBA solutions over the World Wide Web. IIOP enables browsers and servers
to exchange integers, arrays, and more complex objects, unlike HTTP, which only supports
transmission of text.
1.4 Internet IP Address
Internet Principles
In the global network Internet, each node is identified with unique number called IP addressS.
The IP address of a machine is an array of four numbers separated by period, as shown below-
18.10.200. 14
185.25.85. 141
Each number in the above array is an eight-bit inte ger (That is it is between 0 and 255 and
called an Octet). There are three classes of networks in the Internet depending on the numbers or
hosts it can handle. They are
Class A networks
Class Bnetworks
Class C networks
Class A networks can handle a large number of hosts. ClassB networks are capable of han-
dling a moderate number of hosts.
Class C networks can handle only a small number of hosts. The maximum number of host
handled by each network are tabulated in Table 1.4.1.
1.4.1 Class a Network
The first octet of a Class A network 1P address represents the network ID and has a value f
1 to 126. So, there are only 126 Class A networks. However for each Class A network the
ond. third and the fourth octet represent the host ID, which can be any number between 0
256 and hence can have 16,177,2 14 hosts. (Note: 256 * 256 * 256 =16.177.216).
Class A Networks
The general form of an IP address of a Class A network host is
N.H1.H2.H3.
Where
N ranges from l to 126
H1, H2, H3 are numbers from 0 to 255.
1.4.2 Class B Networks
The first octet of a Class B network IP address is a value from 128 to 191. The general format of
a Class B network IP address is
Where
NI.N2.Hl. H2
NI ranges from 128 to 191
N2 ranges from 0 to 255
HI and H2 may range from 0 to 255.
NI and N2 form the network ID and H1 and H2 represent the host ID. There can be up to 16,38
Class B networks on the Internet, each of which can have up to 65,534 hosts.
(Note: Ni takes one of the 64 values from 128 to 191 and N2 takes O to 255. 254 * 254 = 65536
1.4.3 Class C Networks
Class C networks are designed to handle the situation where there would be very large numb
of networks that contained a small number of networks which in turn contained a small number of hosts. Small organizations having upto 254 hosts can go in for Class C networks. The general
format of the IP address is
NI.N2.N3.H
Where
NI ranges from 192 to 233
N2, N3 may vary from 0 to 255
H may vary fron 2 to 255.
There can be upto 2,097,092 Class C networks on the Internet, each of which can have upto
254 hosts. The following table 1.3.2 summarizes the facts on the IP address formats of various
Classes of networks on the Internet.

1.5 Domain Name
A name that identifies one or more IP addresses. For example, the domain name microsoft.com
represents about a dozen IP addresses. Domain names are used in URLs to identify particular
Web pages. For example, Consider the URL
http://www. stxaviers. com/index. html
The domain name is stxaviers. com. Every domain name has a suffix that indicates which
top level domain (TLD) it belongs to. There are only a limited number of such domains. For
example:
gov-Government agencies
edu-Educational institutions
org-Organizations (nonprofit)
mil-Military
com--commercial business
net-Network organizations
ca-Canada
th-Thailand
Because the Internet is based on IP addresses, not domain names, every Web server requires a
Domain Name System (DNS)) server to translate domain names into IP addresses as shown in
Figure 1.7.

Uniform Resource Locator (URL)

URL is the abbreviation of Uniform Resource Locator, the global address of documents a
other resources on the World Wide Web. The first part of the address indicates what protocol
use, and the second part specifies the IP address or the domain name where the resouree:
located.
For example, the two URLs below point to two different files at the domain stxaviers com
The first specifies an executable file that should be fetched using the FTP protocol; the second
specifies a Web page that should be fetched using the HTTP protocol:
ftp://www. stxaviers.com/nov2002result.exe
http://www.. stxaviers.com/index. html
1.6 Internet Services
In this section we discuss some important services available through Internet.
1.6.1 Gopher Service
The Internet Gopher protocol is designed primarily to act as a distributed document delivery
system. While documents (and services) reside on many servers, Gopher client software presents users with a hierarchy of items and directories much like a file system. In fact, the Gopher
interface is designed to resemble a file system since a file system is a good model for locating
documents and services
In essence, the Gopher protocol consists of a client connecting to a server and sending the
server a selector (a line of text, which may be empty) via a TCP connection. The server responds
with a block of text terminated with a period on a line by itself, and closes the connection. The
server between transactions retains no state with a client. The simple nature of the protocol stems
from the need to implement servers and clients for the slow protocols.
1.6.2 Instant Messaging
It is a type of communication service that enables you to create a private chat room with another
individual. Typically, the instant messaging system alerts you whenever somebody on your pri-
vate list is online. You can then initiate a chat session with that particular individual.
There are several competing instant messaging systems. Unfortunately, there's no standard.
1.6.3 Internet Relay Chat
A virtual room where a chat session takes place is called a chat room. If two computers are con-
nected through Intermet the Internet Relay Chat (IRC) application provides a platform for the
users to chat. Technically, a chat room is really a channel, but the term room is used to promote
the chat metaphor
1.6.4 Bulletin Board System (BBS)
BBS is an electronic message center. Most bulletin boards serve specific interest groups. They
allow you to dial in with a modem, review messages left by others, and leave your own message
if you want. Bulletin boards are a particularly good place to find free or inexpensive software
products.
1.6.5 Usenet News Group Service
A worldwide bulletin board systemn that can be accessed through the Internet or through many
online services is called a Usenet service. The Usenet contains more than 14,000 forums, called
newsgroups, that cover every imaginable interest group. It is used daily by millions of people around the world.

1.7 Electronic Mail


Electronic mail is the transmission of messages over communications networks. The message
can be notes entered from the kevboard or electronic files stored on disk. Most mainframes
minicomputerS, and computer networks have an e-mail system. Some elecironic-mail systems are
Confined to a single computer system or network. but others have gateways to other computer
Systems, enabling users to send electronic mail anywhere in the world. Companies that are fully
Computerized make extensive use of e-mail because it is fast, flexible, and reliable.
Most e-mail systems include a rudimentary text editor for composing messages, but many al-
10w yOu to edit your messages using any editor you want. You then send the message to the re.
CIpient by specifying the recipient's address. You can also send the same message to several
Sent messages are stored in electronic mnailboxes until the recipient fetches them. To see if
you have any mail, you may have to check your electronic mailbox periodically, although many
Systems alert you when mail is received. After reading your mail, you can store it in a text file.
Torward it to other users, or delete it. Copies of memos can be printed out on a printer if vou
want a paper copy.
All online services and Internet Service Providers (ISPs) offer e-mail and also support gate-
ways so that you can exchange mail with users of other systems. Usually, it takes only a few
seconds or minutes for mail to arrive at its destination. This is a particularly effective way to
communicate with a group because you can broadcast a message or document to everyone in the
group at once.
Although different e-mail systems use different formats, there are some emerging standards
that are making it possible for users on all systems to exchange messages. In the PC world, an
important e-mail standard is MAPI. MAPI is the abbreviation of Messaging Application Pro-
gramming Interface, a system built into Microsoft Windows that enables different e-mail appli-
cations to work together to distribute mail. As long as both applications are MAPI-enabled, they
can share mail messages with each other. The recent addition to Email is the Voice Email in
which a Voice file is communicated.
1.8 World Wide Web
Many people use the terms Internet and World Wide Web interchangeably, but in fact the two
terms are not synonymous. The Internet and the Web are two separate but related things. The
Internet is a massive network of networks, a networking infrastructure. It connects millions of
computers together globally, forming a network in which any computer can communicate with
any other computer as long as they are both connected to the Internet. Information that travels over the Internet does so via a variety of languages known as protocol. 

1.8.1 Web Technologies
The Web uses the HTTP protocol, only one of the laaguages spoken over the Internet, to transmit data. Web services, which use HTTP to allow applications to communicate in order to exchange business logic, use the Web to share information. The Web also utilizes browsers, such as Internet Explorer or Netscape, to access Web documents called Web pages that are linked to
each other via hyperlinks. Web documents also contain graphics, sounds, text and video.
The Web is just one of the ways that information can be disseminated over the Internet. The
Internet, not the Web, is also used for e-mail, which relies on SMTP, Usenet news groups, in-
stant messaging and FTP. So the Web is just a portion of the Internet, albeit a large portion, but
the two terms are not synonymous and should not be confused.
Web is a system of Internet servers that support specially formatted documents. The
documents are formatted in a script called HTML (HyperText Markup Language) that supports
links to other documents, as well as graphics, audio, and video files. This means you can jump
from one document to another simply by clicking on hot spots. Not all Internet servers are part
of the World Wide Web. There are several applications called Web browsers that make it easy
to access the World Wide Web. Two of the most popular being Netscape Navigator and
Microsoft's Internet Explorer. In a web page information are presented using the following
technologies:
1 HTML
2 Javascript
3.Java Applets
 4. Java Server Pages (JSP)
5. Active Server Pages (ASP)
6. Java Servlets
In the above list the browser machine executes the first three whereas the last three run in the
server machine. XML is a new technology, which is widely used in data formatting and communication. The web pages also contain objects such as cookies and plug-ins, which are explained
in the following sections.
1.8.2 Plug-in
A hardware or software module that adds a specific feature or service to a larger system is called
a plug-in. For example, there are number of plug-ins for the Netscape Navigator browser that
enable it to display different types of audio or video messages.

1.8.3 Cookie
Cookie is a message given to a Web browser by a WNeb server. The browser stores the mesSsage
in a text file (in the client machine itself) and uses each tỉme the browSer requests a page fro
the server. The main purpose of cookies is to identify users and possibly prepare customiZed
Web pages for them. When you enter a Web site using cookies, you may be asked to fill out a
form providing such information as your name and interests. This information is packaged into a
cookie and sent to your Web browser. The next time you go to the same Web site, your browser
WIlI send the cookie to the Web server. The server can use this information to present you with
Custom Web pages. So, for example, instead of seeing just a generic welcome page you might
See a welcome page with your name on it. The name cookie derives from UNIX objects called
magic cookies. These are tokens that are attached to a user or program and change depending on
the areas entered by the user or program.
CoOkies are messages that a Web server transmits to a Web browser so that the Web seryer
can keep track of the user's activity on a specific Web site. The message that the Web server
Conveys to the browser is in the form of an HTTP header that consists of a text-only string. The
text is entered into the memory of the browser. The browser in turn stores the cookie informa-
Web sites use cookies for several different reasons:
To collect demographic information about who is visiting the Web site. Sites often use this
information to track how often visitors come to the site and how long they remain on the
site.
To personalize the user's experience on the Web site. Cookies can help store personal
information about you so that when you return to the site you have a more personalized
experience. When you visit a web site again and see your name mysteriously appear on the
screen, it is because, on a previous visit you gave your name to the site and it was stored in
a cookie. When you returned you would be greeted with a personal message. A good
example of this is the way some online shopping sites will make recommendations to you
based on previous purchases. The server keeps track of what you purchase and what items
you search for and stores that information in cookies.
Web sites will often use cookies to keep track of what ads it lets you see and how often
you see ads.
Cookies do not act maliciously on computer systems. They are merely text files that can be
deleted at any time. They are not plug-ins nor are they programs. Cookies cannot be used to
spread viruses and they cannot access your hard drive. This does not mean that cookies are not
relevant to a user's privacy and anonymity on the Internet. Cookies cannot read your hard drive
to find out information about you:; however, any personal information that you give to a Web
site, including credit card information, will most likely be stored in a cookie unless you have
tion on the hard drive so when the browser is closed and reopened at a later date the cookie information is still available.

turned off the cookie feature in your browser. The cookie will only contain information that you
freely provide to a Web site.
Cookies have six parameters that can be passed to them:
The name of the cookie.
The value of the cookie.
The expiration date of the cookie- this determines how long the cookie will remain active
in your browser.
1.9.1
The path the cookie is valid for-this sets the URL path the cookie is valid in. Web pages
outside of that path cannot use the cookie.
The domain the cookie is valid for this takes the path parameter one step further. This
makes the cookie accessible to pages on any of the servers when a site uses multiple servers
in a domain.
The need for a secure connection--this indicates that the cookie can only be used undera
secure server condition, such as a site using SSL.
Both Netscape and Microsoft Internet Explorer (IE) can be set to reject cookies if the user
prefers.
1.9 Internet Security
As the Internet connects millions of computers across the globe, the security and privacy are two
vital issues in this new era of Information Technology. This section introduces two widely-used
security technologies of the web, SSL and S-HTTP.
Secure Sockets Layer (SSL) and Secure HTTP (S-HTTP)
Secure Sockets Layer, is a protocol developed by Netscape for transmitting private documents
via the Internet. SSL works by using a public key to encrypt data that's transferred over the SSL
connection. Both Netscape Navigator and Internet Explorer support SSL, and many Web sites
use the protocol to obtain confidential user information, such as credit card numbers. By convention, URLs that require an SSL connection start with https: instead of http: .
Another protocol for transmitting data securely over the World Wide Web is Secure HTTP
(S-HTTP). Whereas SSL creates a secure connection between a client anda server, over which
any amount of data can be sent securely, S-HTTP is designed to transmit individual messages
securely. SSL and S-HTTP, therefore, can be seen as complementary rather than competing
technologies. The Internet Engineering Task Force (IETF) has approved both protocols as a
standard.

1.9.2 Encryption 
The word encryption m means translation of data into a secret code. Encryption is the most effec
tive way to achieve data security. To read an encrypted file, you must have access to a secret
key or password that enables you to decrypt it. Unencrypted data is called plain text ; encrypled
data is referred to as cipher text.
There are two main types of encryption. They are
Asymmetric encryption (also called public-key encryption) and
Symmetric encryption.
1.9.3 Asymmetric Encryption (public-key encryption )
Whitfield Diffie and Martin Hellman invented public key cryptography in 1976. For this reason
it is sometime called Diffie-Hellnan encryption.
This is a cryptographic system that uses two keys-a public key known to everyone and a
private or secret key known only to the recipient of the message. When A wants to send a secure
message to B, he uses B's public key to encrypt the message. B then uses his private key to de-
crypt it. An important element to the public key system is that the public and private keys are
related in such a way that only the public key can be used to encrypt messages and only the
corresponding private key can be used to decrypt them. Moreover, it is virtually impossible to
deduce the private key if you know the public key.
Public-key systems, such as Pretty Good Privacy (PGP), are becoming popular for transmit-
ting information via the Internet. They are extremely secure and relatively simple to use. The
only difficulty with public-key systems is that you need to know the recipient's public key to
encrypt a message for him or her. What's needed, therefore, is a global registry of public keys,
which is one of the promises of the new LDAP technology.
1.9.4 Symmetric Encryption
In Symmetric encryption the same key is used to encrypt and decrypt the message.
1.10 Electronic Commerce (E-Commerce) and Electronic Data Interchange (EDI)
EDI stands for the transfer of data between different companies using networks, such as the
Internet. As more and more companies get connected to the Internet, EDI is becoming increas-
ingly important as an easy mechanism for companies to buy, sell, and trade information. ANSI

has apprOved a set of EDI standards known as the X12 standards. E-Commerce refers to trans-
acting business on-line. This includes, for example, buying and selling products with digital cash
and via Electronic Data Interchange (EDI).
1.10.1 Digital Cash
Digital cash refers to a system that allows a person to pay for goods or services by transmitting
a number from one computer to another. Like the serial numbers on real dollar bills, and rupee
bills the digital cash numbers are unique. Each one is issued by a bank and represents a specified
sum of real money. One of the key features of digital cash is that, like real cash, it is anonymous
and reusable. That is, when a digital cash amount is sent from a buyer to a vendor, there is no
way to obtain information about the buyer. This is one of the key differences between digital
cash and credit card systems. Another key difference is that a digital cash certificate can be
reused.
Digital cash transactions are expected to become popular shortly. However, there are a
number of competing protocols and it is unclear which ones will become dominant. Most digital
cash systems start with a participating bank that issues cash numbers or other unique identifiers
that carry a given value, such as five dollars. To obtain such a certificate, you must have an ac-
count at the bank; when you purchase digital cash certificates, the money is withdrawn from your
account. You transfer the certificate to the vendor to pay for a product or service, and the vendor
deposits the cash number in any participating bank or retransmits it to another vendor. For large
purchases, the vendor can check the validity of a cash number by contacting the issuing bank
1.10.2 Digital Signature
A digital code that can be attached to an electronically transmitted message that uniquely identi-
fies the sender is called a digital signature.. Like a writen signature, the purpose of a digital
signature is to guarantee that the individual sending the message really is who he or she claims
to be. Digital signatures are especially important for electronic commerce and are a key compo-
nent of most authentication schemes. To be effective, digital signatures must be unforgeable.
There are a number of different encryption techniques to guarantee this level of security.















































Tuesday, December 5, 2023

Classes, Object and Method



7.I INTRODUCTION

All real world applications involve objects and collaborative operations among those object
For example, if we consider the banking system, the objects of interest include custome.
account, clerk and manager, etc. Any transaction in a bank involves collaborative activiies
of one or more of these objects. Central to the object oriented programming paradigm are
the concepts of classes and objects. Here all the objects in the real world are represented by
objects in the programming environments too. A collection of the objects of similar type is
called class. The classes are the blueprints for the objects and its type. In other words, classes
are the abstractions of objects and the objects are the instances of the classes. Java being
purely an object oriented language supports the concepts of classes and objects very well and
all operations are realized through the use of classes and their objects.
7.2 CLASS DEFINITION INSTANCE VARIABLES
AND MEMBER METHODS
The syntax of defining a class is as follows:
class classname
instance varíables
member methodsalihe

Here class is the keyword. The classname is the user defined name for the class type and
it should be a valid Java identifier. The instance variables are the member data of the class.
They are declared as
data-type instance-variable;
fomber methods are the methods which will operate on the instance variables of the
objects of the class. The syntax of defining a method is as follows:
return_type method -name (arguments)
statements
where return_type is the type of the value expected to be returned from the method. The
othod name is the name of the method and it should be a valid Java identifier. The arguments
(optional) are the inputs to the method to be passed from the calling method.
73 DECLARATION AND CREATION OF OBJECTS,
ACCESSING MEMBERS
A class represents the blue print of a set of objects with common member data and common
hehaviour. To be able to use the member data and to perform the operations over the member
data, we need to create objects of the class. This has to be done in another method which is
not a member of the class. The non-member method of the class which deals with the obiects
of the class is termed the calling method.
The process of creating an object of type classname is a two-step process:
1. Declaring a reference of type classname
2. Allocating memory for an object of type classname using new operator and assigning
the reference to the object to the reference
The syntax of creating an object of the class type classname 1s as follows:veleelhbs
classname obj;
0bj = new classname();
Or
The declaration of the reference obi and allocation of memory for an object and assigning
die reterence to the object created to the reference obj can be combined together is as follows:
classname obi = new classname();
We use the second version throughout the book.
oCan access the members (member data and member methods) of an object with the
help of an operator called member operator. The symbol for the operator is dot (-). It expects
an object reference to the left of it and a member to the right of it.

ouhlic static vo1d main(String s[l)
Input-Output:
{
Measure m = new Measure():
m.feet = 12;
m.inches = 6.5f;
2
m.display();
12 feet - 6.5 inches
7.4 CLASSIFICATION OF MEMBER METHODS
{
Depending on the data communication between the member methods and the calling methods,
the member methods are classified into four categories:
1 Methods with no arguments and no return value
Methods with arguments and no return value
3. Methods with arguments and with return value
4. Methods with no arguments but return value
Methods with no arguments and no return value
Methods with no arguments and no return value do not take any arguments from the calling
method and do not return any value to the calling method. There is no data communication
between the member method and the calling method.
The general form of the member method is as follows:
void method name ()
statements
Note that the return type is void, which indicates that the member method does not return
any value to the calling method and no arguments are specified within the parentheses atter
Bethod name. Let us now look at a program which illustrates this kind of member methods.
The syntax of invoking the method is as follows:
objref .method name(0;
where objref is a reference to an object of the classtype under consideration; method name is the
name of the method of the class.

4
PROGRAM 7.1 To illustrate method
Input-Output:
6.3
}
import java . util . *;
class Measure
}
class MM1
on the Screen.
int feet;
float inches;
void get ()
Scanner sc = new Scanner (System. in);
feet = sC. nextInt ();
inches = sC.nextFloat ();
void display ()
Enter feet and inches
System. out. println (feet + + inches ) ;
public static void main(String s[])
Measure m = new Measure();
without arguments and
System. out.printIn("Enter feet and inches") ;
m.get ();
System.out. print ("The Measurement is );
m.display(0;
The Measurement is 4-6.3
no return vaue
The class measure is defined with two instance variables feet and inches of type int and
respectively and two member methods get() and display(). The purpose of get () is to accept t
values feet and inches values of an object of type measure and that of display() is to display them on the screen. 

Here it can be noticed that both get() and display() belong to the category of methods
without arguments and no return value as the return type is specified as void for both the
we and no arguments are specified within the parentheses after the method names as
shown below:
void get()
Scanner sc = new Scanner (System. in):
feet = sc. next Int ();
inches = sC.nextFloat ();
void display ()
System.out. println (feet + ""+ inches) :
{
In the main() method of the class MM1 an object of Measure type is created with its reference
in the variable m. The method invocation m.get (); enables us to accept feet and inches values
of the object created and m.display (); displays them on the screen.
Methods with arguments and no return value
Methods with arguments and no return value take arguments from the calling method and do
not return any value to the calling method. There is one way data communication between the
member method and the calling method. That is from calling method to the member method
of the class.
The general form of the member method is as follows:
Classes, Objects and Methods 141
void method name (arguments )
statements
Note that the return type is void and arguments are specified within the parentheses after
method name.
The syntax of invoking the method is as follows: totetesgsiti
objref.method_name (arguments) ;
where objref is a reference to an object of the classtype under consideration; nethod _name is the
name of the method and arguments are the values provided by the calling method.
Let us now look at a program which illustrates this kind of member methods.
PROGRAM 7.2 To illustrate method with arguments but no return valuea
class Measure
{
int feet;

}
}
}
Input-Output:
float inches;
class MM2
void get (int f, float i)
{
feet = f;
void display ()
inches = i;
public static void main(String s[])
System. out.println (feet + " + inches);
Measure m = new
m.get(5, 7.23f);
System.out. print(The Measurement is ");
m. display ();
feet = f;
inches = i;
The Measurement is 5-7.23
The class measure is defined with two instance variables feet and inches of type int and
float respectively and two mnember methods get() and display(). The purpose of get() st
set feet and inches values of an object of type measure and that of display() is to dispia
them on the screen.
10 Here it can be noticed that the method get() belongs to the category of methods
arguments and no return value as the return type is specified as void and arguments are spou
within the parentheses after the method name as shown below:
void get(int f, float i)
in the variable m. The method invocation m.get (5, 7.23f) ; enables us to set the feet and
In the main() method of the class MM2 an object of Measure type is created with h its referen:
inches values of the object created and m.display(); displays them on the screen.


Methods with arguments and with return value
Methods with arguments and with return value take arguments from the calling method and
return a value to the calling method. There is two way data communication between the
member method and the calling method. That is from calling method to the member method
of the class and Vice-versa.
The general form of the member method is as follows:
return_type method_name (arguments )
Statements
Return (expression);
Note that return_type is anything other than void and arguments are specified within the
orentheses after method_name. The statement return (expression ) is responsible for returning a
alne of type return_type to the calling method. The expression should be of type return type
ar should be convertible to return_type. Let us now look at a program which illustrates this
kind of member methods.
The syntax of invoking the method is as follows:
variable = objref. method name (arguments);
where objref is a reference to an object of the classtype under consideration; method name is the
name of the method and arguments are the values provided by the calling method. The variable
is to collect the value returned by the method. The type of variable should be compatible with
the value returned by the method.
PROGRAM 7.3 To illustrate mnethod with arguments and return value
class Measure
int feet;
float inches;
{
float getMeters (int f, float i)sEbsot
feet = f;
Classes, Objects and Methods 143
oos inches = i;
float meters = (feet + inches/12) /3 . 28f;
return meters;
void display ()
System.out. println (feet + "" + inches);

{
}

class MM3
{
Input-Output:
5-6.4
public static void main(String s[])
{
WIth JAVA
Measure m = new Measure();
float meters = m.getMeters (5, 6.4f) ;
The Measurement in feet and inches
System. out. println ("the Measurement in feet and inches");
m.display ();
System. out. println ("The Measurement in
The Measurement in meters = 1.6869919
feet = f;
and float respectively and two member methods getMeters () and display(). The purpOst
getMeters () is to set feet and inches values of an object of type measure with the argumEN
provided and return the meters equivalent of the measurement and that of display() ) is to isja
The class measure is defined with two instance variables
the measurement in feet and inches on the screen.
inches = i;
float getMeters (int f, float i)
meters = + meterS);
Here it can be noticed that the method getMeters() belongs to the category ofm
with arguments and with return value as the return type is specified as float and arguments
specified within the parentheses after the method name as shown below:
float meters = (feet + inches /12) /3.28f;
return meters;
feet and inches
of type i
Methods without arguments but with return value
In the main() method of the class MM3 an object of Measure type is created with its Tetere
in the variable m. The method invocation float meters = m.getMeters (5, 6.4f) ;enables US 0s
the feet and inches values of the object created and the value returned by the method 1S Coue
by the float type variable meters. The method invocation m. display (0; displays the measu
in feet and inches on the screen. The value of meters is also displayed on the soiev
method and but return a value to the calling method. There is one way data Communicatl
Methods without arguments and with return a value to  take arguments from the call


0
nts
between the member method and the calling method. That is from the member method to the
calling mnethod.
The general formn of the member method is as follows:
return type method name()
is
statements
return (expression)
Note that return_type is anything other than void and no arguments are specified within
the parentheses method name. The statement return (expression) is responsible for returning a
value of type reeturn type to the calling method. The expression should be of type return type
or should be convertible to return type. Let us now look at a program which illustrates this
kind of member mnethods.
The syntax of invoking the method is as follows:
variable = objref.method name():
where objref is a reference to an object of the classtype under consideration: the method name
dbe name of the method. The variable is to collect the value returned by the method, The
Classes, Objects and Methods 145
type of variable should be compatible with the value returned by the method.
PROGRAM 7.4 To illustrate method without arguments but with return value
class Measure
int feet;
float inches;
void get(int f, float i)
feet = f;
inches = ij
float getMeters()
float meters = (feet + inches /12) /3.28f;
return meters;
void displav() oaibnnodsoovn bodtern bs bstsg dot i0
System.out. printIn (feet + _" + inches);



Tuesday, February 16, 2021

AC and DC current

AC (alternating current) 
Alternating current aisi Vidyut Dhara hai hai jo samay ke sath apni Disha Barman Badal leti hai, tatha is prakriya ki punaravriti hoti rahti hai ac  kahlati hai.hamare gharon mein pahunchne wali Vidyut ac hi hoti hai Bharat mein aisi ki avriti 50 hz hai.

DC (direct current)
direct current vah Vidyut Dhara Jo samay ke anusar apni Disha nahin badalti apni Disha Sthal rakhti hai direct current kahlati hai baton tatha DC generation se ISI prakar ki dhara prapt hoti hai.

Pratyavarti Dhara (alternative current)DC Parivartan mein registence ya load mein current Keval ek direction mein flow hota hai tatha iska man bhi niyat hota hai is prakar ki dhara DC Dhara kahlati hai iske viprit AC supply mein Dhara ka man tatha Disha periodically change hota rahata hai.
Periodically ka Arth hota hai ki usi Kiran ki baar baar punaravriti hoti rahti hai.
"atta pratyavarti Dhara Hoti hai jismein current pahle ek Disha mein pravahit hota hai tatha per Disha badalkar dusri Disha mein pravahit hota hai tatha ek nirdharit avadhi ke bad yah process repeat hoti rahti hai kyunki Dhara bolate ki prakriti per nirbhar Karti hai tatha alternated bolate ek aisi bolate jhuthi hai jiski Dhruv tatha man samay ke sath change hota rahata hai "

Sunday, February 7, 2021

Frames And Forms



🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏Is post ko likhane se mera Aaj yah hai ki aap sabhi ko liye is post ke madhyam se main HTML ke bare mein kuchh bataen ki koshish kar raha hun kripya aap sabhi is post ko jyada se jyada read kijiye aur aap apne doston ke sath bhi isko share kijiye 🙏🙏🙏

🙏🙏🙏🙏 Thank you guys 🙏🙏🙏🙏

The browser window is called the container. It is possible to divide the container into several frames and use each frame for displaying a different HTML document. Frames have the following characteristics.
1 Each frame is given a nam
2 Each frame will be targeted by an HTML document.
3 Each frame resizes itself dynamically in response to the change in the size of visible client area.



3.1 frameset definition
A set of frames are defined using the < frameset > tag which ends </ frameset > tag. The  < Frameset > tag has two attributes .
1. row or column frame.
2. size of each frame.
The size of the frame are mentioned in any one of the following units: 
1. Pixel unit
2. Percentage unit
3. Fraction unit.


3.1.1 pixel unit 
The pixel unit simply represents the number of pixel in each frame. Common must separate the numbers.
 For example consider the following
< Frameset cols = " 150,70,70">
...............
.......
.....
< /Frameset >
base definition creates 3 columns wise frames with the first frame of 150 pixel width, second of 70 pixel width and III also of 70 pixel width.


3.1.2 percentage unit
The percentage unit divide the window according to the specified percentages. For example consider the frame set definition.
< Frameset rows =70%,30% >
.............................
.........

...

</Frameset >
in the above definition two row-wise frames are defined in the container. The first frame has 70% of the container and the second one has 30% of the container.
than hundred all percentage are scaled down.a khuda some of the percentage is less than 100 the extra space are left out.

3.1.3 Fraction Unit
Instead of using percentage unit we can use fraction unit to represent the relative size of the frame. Support we give the following: 
< Frameset cols = " 4*,4*,*," >
......................
...........
.......
....
</Frameset >
This defines four Kollam wise frames. The first two frames have 4 unit size, and III and IV ones have 1 unit each.So , the frame sizes are 4 / 10, 4/10,1/10,and 1/10 of 5he overall container size.

3.2 frame definition
The definition of the frame is given using the < frame > tag . The < frame > tag May have any of the following attributes:
1 source HTML address (SCR )
2 name of the frame ( Name )
3 Margin width ( marginwidth)
4 Scrolling button (  scrolling  )
5 Can it be resized ( noresize )
 Example 2.1 banking self helps page
Consider the following frame set definition. Two row-wise frames  are defined










< html >
< head >
< title > welcome to the commercial Bank of Budaun
< /title >
< / head >
< Frameset rows = " 45, 55 " >
< frame name = "f1" scr " D:\servlent\Banking\Bank1.html " >
< Prem name = " f2 " scr = " http\\localhost: 8080\servlet\BankSelfHelpServlet" >
< /frameset >
< / html >



3.3 nested framesets

In this section be deal with nested framesets. In the example shown here, first the window is row-wise divided into two frames. The bottom frame is column wise divided further into two frames. The < noframe > tag is also used to communicate suitable message vahan the browser does not support frames.

< html >
< head >
< title >Tutorial on web technology< / title >
</head >
< frameset rows="152,*" >
< frame name = " banner" scrolling ="no" noresize target = "contents " scr = "frameheader.html">
< frameset cols "150,*">
< frame name="contents" target="main" scr= contents.html">
< frame name="main" scr=body.html">
</Frameset>
< noframe >
<body>
<P>this page uses frames, what your browser does not support them.</p>
</body>
</Noframes>
</Frameset>
</html >


3.4 HTML forms
using forms we can design a webpage on which a user can communicate his wish, opinion, suggestion etc.
A form h defined with < form > tag and < / forms > tag . The form tag has three attributes. They are
1 action
2 method
3 enctype


3.4 . 1 action attribute
The falls are used to get the input from the user. The user input submitted to the server.the action attribute inform the browser the location of the server program to which the form input has to be submitted. The server program may be a cgi-perl script, a java Applet or any other server program like JSP,ASP etc.
For example, if you want to a program \cgi-bin\to be executed when the the form is submitted.then we must mention the following attribute value in the <form> tag.
Action = "/cgi - bin/comments.exe"
This means that comments.exe is a file that exists in a directory cgi- bin. The name of the executable program and its location of the directory depends upon the web server. We can also enter a complete URL and host name. FB live of the starting part of the URL, the browser will submit the form to the server, which supplied the form.

3.4.2 method attribute
The method attribute has only two choice of values. They are
method =  "get"
method = "post"
this denote the protocol the server uses in implementing the forms features. Usually the value used for method attribute is
method = "post"

This is the recommended protocol. Vidya post,the information from the user is put into the data stream of the http,and the back-end program can read the data h input through the the "standard input" data stream in the case of method= " get" , the data received in the form or place at the end of URL. If the form is very big and gets a number of input, the "get" method causes the URL to be very long. So, the method = "get" option is  discouraged.

3.4.3 ENCTYPE Attribute
This attribute is used to inform the server the payoff to handle the encryption process.Usaully it is set to 
Application/x-www-form-urlencoded.    This is the value is given as 
enctype = " application /x-www-form-urlencoded "

3.5 element of a form
In a form there can be saral elements to get the input form the use. They are
1 Selection list 
2 Input box
3 Text Area 

3.5.1 Selection List Box 
A selection list presents a list of options to the user. The user can select choice  from the list. The selection list box is created with < select > tag. The definition ends with < / select > tag. The < select > tag has three attributes. They are
1 Name attribute
2 Size attribute 
3 Multiple attribute
The name attribute assigns a name for the variable, which will hold the selected choice . For example consider the following:
< select name = " namebox " >
< opinion > Aparna </ opinion >
< Opinion > Nithya </opinion >
< opinion > Priya < / opinion >
< /select >
This creates a selection Box with three choice, Arpana, Nithya and Priya.It is possible to assign a value for each option using value attribute in option tag. This is illustrated below: 

< Select name = "namebox" >
< Option value = "1"> Arpana</option >
< Option value = "2" > Nithya</option >
< Option value = "3">Priya</option>
</Select>

in the drop down list be normally select one of the items.there are certain cases in which the user can be given a freedom to select more than one of the options. This is a provided by the multiple attribute in the select tag. 
<Select name = townvisited multiple = "multiple">

3.5.2 Input Elements
the input of the user can be given in any of the following GUI elements
1. Checkbox
2. Radio button
3. Text field
4. Password field
5. Hidden field
6. Button
7. Submit button
8. Reset button

The input box is defined using the <input> tag. The type attribute define whether it is a check box radio button etc. The value of this picture

3.5.3 text field and submit button
Consider the following HTML document.
<HTML>
<Head>
</Head>
<Body>
<Form name = "biodata_form">
<H3>enter your age please.</H3>
<Input type = "text" name = "age" >
<Input type = "summit" value= "submit Age ">
</Form>
</Body>
</HTML>

3.5.4 checkbox
the following is a HTML document that shows a form with several checkboxes.
<HTML>
<Head>
</Head>
<Body> 
<H3>please select your computer configuration<br></h3>
<h4>
<input type="checkbox"
name= "computer" value ="CPU ITel p4 1.8GHz">Itel p4 1.8GHz<br>
<Input type = "checkbox"
name = "computer"  value = "HDD 40 GB " >bade 40GB <HDD<br>
<Input type = "checkbox">
name = "computer" value = "15 inch color monitor"> With monitor<br>
<Input type = "checkbox"
name = "computer" value = "1.4MD FDD" >With FDD<br>
< Input type = "checkbox"
name = "computer" value="CD ROM Drive "With CD ROM Drive<br>
<input type = "checkbox"
name ="computer" value="Printer"<br>
<Input type = "text" name="Order" size="50">
<Input type = "button" name="test" value="order please">
</h3>
</body>
</html>

3.5.5 password field
The following HTML document shows a password field.notice that when a user types the password the corrector are no displayed. The asterisk symbol will be displayed.
<HTML>
<Head>
<Title>authorisation page</title>
</Head>
<Body>
<Former name="my form">
User ID:<input type=text name=id><br>
Password:<input type= password name=password><bri
<Input type= submit value =Go>
</Form>
</Centre>
</body>
</html>

3.5.6 Radio button and text field
Consider the following HTML document
<HTML>
<Head><Title>foreign exchange</title>
</Head>
<Body>
<Form name=" forex form">
<Pre>
Enter the value is rupees
<Input type=text name="rupees">
<Input type=radio name=currency>US dollar


<Input type=radio name=currency> UK pound
<Input type= radio name=currency>Singapore dollar
<Input type =radio name= currency>UAE Dhirams
</Form>
</Body>
</HTML>


Is post ke liye jyada se jyada support kijiye aur comment karke hamen jaruri bataiye ki aap ke liye yah post kaisi lagi yadi is post aapke liye acchi lagi ho to aap hamen comment ke madhyam se bata sakte ho ho

Web Technology and Design

                    Internet Principles In 1984 William Gibson in his sci-fi novel Neuromancer coined the term Cyberspace. It refers to the ...