Previous Table of Contents Next


The article starts with a headline, which should be printed larger than the main body of the text, centered at the top of the application display window.

Non-Web applications, such as a traditional client/server GUI application, would contain instructions to tell the client to display the headline in, for example, Times New Roman, 24 point font, starting at some particular X and Y coordinate point on the screen. If the client doesn’t have the right font, you could be in trouble. And if the client monitor doesn’t have enough room to handle the display, the headline won’t necessarily appear centered, and might even run off the side of the screen. In other words, detailed knowledge of the client’s capabilities and limitations must be taken into consideration by the application developer, and must be considered for every environment from which a client might attempt to access the application—or you must restrict your client’s environment options.

To deliver this article across the Web to a browser, you would first convert it to an HTML file, as shown in Listing 27.1.

Listing 27.1. Newspaper article with embedded HTML tags.


<HTML>



<HEAD>

<TITLE>Demo Web Page: Newspaper Article</TITLE>

</HEAD>



<BODY BGCOLOR=”#FFFFFF”>



<H1 ALIGN=CENTER>Oracle Ranked First</H1>



<HR>

Leading industry magazines have announced the

results of various comparison tests, and Oracle

once again is the hands-down winner.<P>



<IMG SRC=”../images/num_1.gif” align=right vspace=10 hspace=20>



The Oracle Web Application Server version 3.0

has been voted first in such categories as

scalability, reliability, performance, support

for industry standards, open architecture,

security, upgradeability, server management

and administration.<P>



One industry analyst is quoted as saying that

Oracle is “guarantee[d] ... a top spot in the

future of Web database development.”<P>



For information about the Oracle Web Application

Server 3.0 product, you can visit the Oracle

Corporation

<a href=”http://www.oracle.com”>home page</a>,

or go directly to their

<a href=”http://www.olab.com/”>

Application Server page</a>.



</BODY>

</HTML>

In Listing 27.1, HTML tags are embedded in the text to instruct the Web browser how to format the output.

The HTML file in Listing 27.1, when displayed in a Web browser, looks like Figure 27.2.


Figure 27.2.  Browser displaying newspaper article.

With HTML, the developer and end user are both freed from platform-specific considerations. Instead, the developer embeds tags into the text of the newspaper article that instruct the browser to print the headline, as in the example, a first-order heading, using whatever default font is available to the browser. The browser does the work of selecting the font at the time it displays the article. The client’s operating system is irrelevant, its specific fonts are not an issue, and the browser is given the freedom to approximate the GUI management on the client, including centering, paragraph wrapping, and incorporation of any image files, all within the general guidelines defined by the HTML file.

The result is that different browsers don’t necessarily display a page in exactly the same way on every client. But the display is consistent enough and, with proper use of HTML table tags, developers get enough control to give their applications a professional appearance, yet still take advantage of the generic HTML display tags.

Graphic images, stored in separate files, can also be incorporated into the HTML file by reference, and delivered easily by the server to the client at the time of the request.


Tip:  
If you have a browser, you can experiment with HTML by simply creating a regular ASCII text file that contains HTML tags, storing the file on your hard drive, and opening that file with your Web browser (generally by selecting FILE-OPEN FILE from the browser’s pull-down menu). To incorporate graphic images, just put the image files on your hard drive, and reference them with the IMG tag, using the proper directory reference relative to the original HTML file. You can even incorporate images from across the Web, but be careful—don’t violate any copyright laws or use another Web server’s processing resources inappropriately.

Java

Java had a relatively quiet introduction in 1991 as Oak, a language intended to support the creation of device drivers, primarily for the purpose of networking household appliances. But in 1995 it rocketed to the forefront of the Internet stage, when the industry realized that it has the ability to deliver object-oriented, cross-platform, mission-critical applications. Today, many analysts believe Java will become “the COBOL of the ’90s.”

The power and uniqueness of Java comes from the fact that it runs in what is called a Virtual Machine (VM). A VM is a software layer between the Java application and the hardware it runs on, creating an environment within which the application can expect the same behavior regardless of what hardware it is actually running on. Developers are able to program without concern for the specifics of the user’s platform. The final program, once written, can run on any machine.

In addition, a layer of security exists that prevents Java from doing anything destructive to the local environment, such as secretly deleting files, affording protection to the end user from viruses or errant applications running amok.

What HTML has meant for file serving on the Web, Java promises to be for application distribution. It’s capable of delivering high-quality, robust applications with the look and feel of sophisticated GUI tools, such as Oracle’s Forms product.

JavaScript

JavaScript is an object-based (but not truly object-oriented) scripting language created by Netscape and Sun. It is interpreted, rather than compiled. JavaScripts can run on the client in most browsers, and can also run on the server with Netscape’s LiveWire environment. It is platform-independent, and, although it’s not as powerful as Java, it’s easier to program scripts more quickly, especially for novices.


Previous Table of Contents Next
Используются технологии uCoz