Chapter 21

21.1

State whether each of the folowing is true or false. If false, explain why.

a) Web servers and clients communicate with each other through the platform-independent HTTP.

True.

b) Web servers often cache web pages for quick reloading.

False. Web browsers cache web pages for quick reloading.

c) The information tier implements business logic to control the type of information that is presented to a particular client.

False. The middle tier implements business logic and presentation logic to control interactions between application clients and application data.

d) Client-side scripts can access the browser, use features specific to that browser and manipulate browser documents.

True.

e) A virtual directory is an alias for an existing directory on a remote machine.

False. A virtual directory is an alias for an existing directory on the local machine or network.

f) The Apache HTTP Server is said to be platform independent because it runs on various operating systems, such as UNIX, Linux, Windows and Max OS X.

True.

g) The path in a URL normally specifies the location of an actual directory on the server.

False. For security reasons the path normally specifies the location of a virtual directory.

21.2

Fill in he blanks in each of the following statements:

a) The two most common HTTP request types are get and post .

b) In a three-tier application, a web server is typically part of the middle tier.

c) The most popular client-side scripting language is JavaScript.

d) A(n) domain name system (DNS) server translates a fully qualified hostname to an IP address.

e)Localhost is a hostname that references the local computer.

f) A(n) alias is Apache's equivalent to Microsoft IIS's virtual directory.

g) The bottom tier (also called the data tier or the information tier ) maintains the application's data.

h) Multipurpose Internet Mail Extensions (MIME) is an Internet standard that specifies data formats so that programs can interpret data correctly.

21.3

Define the following terms:

a) HTTP.

Hypertext transport protocol is a request/response protocol in the client/server computing model. This protocol forms the backbone of the internet.

b) Multitier application.

This term is a way of grouping applications into serparate tiers or layers. A multitier application can have many tiers such as an interface, business logic, or a database for example.

c) Request method.

There are two common types of request methods, GET, and POST. These methods are used to send and receive information over an IP network. The "GET" command requests data from the server to be loaded on the client. The "POST" command sends data generated from the client to the server.

d) Virtual directory.

A virtual directory is an alias to a real local directory on the server used to hide the location of files from outsiders to enhance security by obscurity.

e) Web server.

A web server is a computer that is set up to process requests from a client computer that runs a web browser. The information served by the web server is rendered in the client web browser.

21.4

In a three-tier application, explain how the middle tier (e.g., web server) interacts with the client tier (e.g., web browser).

The middle tier web server application handles request via HTTP request methods "GET" and "POST".

21.5

Explain the difference between the get request type and the post request type. When is it ideal to use the post request type?

The client receives data when it sends a "GET" method to the web server. The web browser will render the files retrieved after they are finished downloading. The "POST" method is used when the client attempts to send information to the server in order to communicate with and the resources residing on the server.

21.6

Configure Apache to serve a home page from your computer.

Bad Link Good Link!

21.7

Discuss the benefits and disadvantages of client-side vs. server-side scripting.

There are always trade-offs with anything in life. With client-side scripting, the advantages are server performance gains achieved by offloading the processing of program code to the clients. This benefit comes with the price of exposing the coding of the site or program to the user. This could create security problems for an organization and could threaten the control of intellectual property. The benefits to server-side scripting include more programmer flexibility due to the native system access the server has available to it. It can generate results faster for data intensive calculations when parsing database information. Also, the security risk is much lower because it is difficult for attackers to obtain the working program data.

News:

Working on Chapter 23.