Docstoc

Browser and Web Server Interaction

Document Sample
Browser and Web Server Interaction Powered By Docstoc
					Browser and Web Server Interaction

       As was mentioned before, the Internet and the WWW are not the same thing.
The WWW is simply one of many Internet based communication systems. We will now
look at basic client-server architecture and how the WWW functions on the Internet by
using the analogy of a road network.

Client Server Architecture

       Client-server is a style of computing where the client machine makes a request of
a server machine. The request is usually a request for information, as in a database
request, or for processing, such as updating a database or running a batch process.
The client machine makes the request, and the server machine fulfills this request. The
benefit of client-server systems is that they take advantage of the strengths of each
machine or platform. In a typical scenario, the client handles some application logic and
the presentation to the user while the server provides the back-end processing and
database functions.
       In a typical Web application, the browser serves as the universal client that sends
a request for a web page, interprets the HTML document, and displays it to the user.
The web server receives the request through the HyperText Transport Protocol (HTTP)
and returns the required information in HTML format that the client can understand.
Similar to client-server, you can distribute the application processing and database
management portions to varying degrees between the client and the server machine.

Web Based Architecture

       The main benefit to Web-based applications over client-server is found in the
deployment. In a Web-based scenario, you don't have to deploy a new executable on
each person's desktop with each new application feature or update. The browser serves
as the universal client, providing access to the most current information on the server.
Version control, software distribution, and systems management costs are significantly
reduced for Web-based applications.
       A more in-depth discussion concerning how the web client and server interact is
warranted here. Historically, Web applications have been based on HTML and common
gateway interface (CGI) programs on the server. The Web browser interprets the HTML
tags and appropriately formats the page for the user. A web page can be a combination
of formatted text, images and graphics, audio, and video. HTML also allows for the
creation of basic forms that contain text fields, radio buttons, checkboxes, push buttons,
and listboxes.
       We mentioned the HTTP protocol earlier in this lesson. HTTP is the protocol that
allows the browser to connect to a web server and transfer information. HTTP is a
connectionless protocol; that is, the client and server don't maintain a persistent
connection. The client makes a connection to the server and sends a request. The
server receives the request, processes it, then terminates the connection. This process
is repeated many times during a user session. This kind of communication would be like
having a telephone conversation with a friend where you would say something, hang up
the telephone, then dial again to say something else. This dialogue is very tedious.
Interactive applications must have some way to maintain state with the user machine in
order to provide for the needs of applications like sales order processing.
Static VS Dynamic Web Pages

       Web-based applications have made the transition from solely publishing
information to creating an interactive session with the user. Static web pages represent
those pages that provide information that is nicely formatted in standard HTML. For
example, a person might be able to request an employee benefit handbook to become
familiar with the latest updates in benefits. Static pages are nice, but users want
something more.
       Dynamic web pages are those pages that provide true user interaction. In this
model, users interact through the use of server-side programs that provide for an
enhanced experience. Instead of just reading about the latest human resource benefits,
employees can register and update their benefits. Dynamic web pages support the
building of true interactive applications. Once you have read the published flight
schedules, you can make airline reservations electronically over the Internet. Stock
brokerage houses can publish the hottest stock tips and then enable you to capitalize
on the investment through online stock trading. Dynamic web pages provide a world of
new possibilities over static pages.

Physical Connections

       The Internet consists of millions of miles of cables laid down by
telecommunication companies. They are leased for prices that depend on their capacity
and distance. A single telephone line like the one leading from your home can handle
about 3 kilobytes per second, the equivalent of a page of text per second. Fiber optic
cables can handle data well into the thousand millions of bytes per second range.
Even though the cables might be of different types the are all connected by a complex
network consisting of intricate junctions. Just like a network of roads it is possible for
data to travel from point A to point B using many different paths. If there is a roadblock
or an obstruction on one of these paths there are always other paths to the same
destination.




       Notice in the picture that there are bigger and smaller roads which all
interconnect. Although they all have different capacities for carrying data, they can
communicate because they follow the same Internet protocols. Thanks to these
protocols those same cables can be used to provide a wide variety of services like
email, bulletin boards, and of course the WWW, just like we can use roads to get to the
store, deliver products and run bus routes.

Browser and Web Server Interaction

        Simply put, the World Wide Web is a world wide encyclopedia of information. To
take advantage if this we need a computer with a Web Browser and a connection to the
Internet.
        When you navigate your way on the Internet you are viewing Web Pages stored
on machines called Web Servers. A Web Server stores information and send it to the
user when they request it from their computer using a Web Browser. In other words the
Web Server is the Server and the users computer is the client in a Client Server
configuration.
        When the user types a Web Address or clicks on a hyperlink in a Web Browser
the Browser sends a request to the Web Server for the particular page. This is like you
ordering a pizza and having it delivered to you. In either case, you don't need to know
exactly where the product or information is coming from or how it gets to you. It may
take 1 second or 1 hour or more depending on how busy the network is and the size of
the roads or cables.
        For Example, lets say you clicked on a link to a page containing information on
how to make the worlds best pizza. This page of information could be stored on a Web
Server in Canada, China, or in this case Italy. The user does not need to know and in
most cases will not notice any difference. Before you know it the information is
displayed in front of you and it seems like it is stored right on your computer. Actually,
the page is stored on your machine. Remember, request made from a browser for a
document from a Web Server are like requesting a document to be delivered to you.
This is how the document arrived at your machine. HTTP was used to send a copy of
the page to your computer. The benefit of this system is that once the page has been
sent to your machine. you are no longer maintaining a connection with Web Server or
using network resources. Remember, HTTP is a connectionless protocol and once the
document has been sent the connection is dropped. Imagine the waste of resources if
every time you ordered a pizza the delivery person was not allowed to go back to work
and deliver more pizzas because you would not let them go. This is what would happen
if a connection was maintained between the Web Server and the Browser.

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:12
posted:6/24/2011
language:English
pages:3