📄 022-024.html
字号:
<HTML>
<HEAD>
<META name=vsisbn content="1558515682"><META name=vstitle content="Java Digital Signal Processing"><META name=vsauthor content="Douglas A. Lyon"><META name=vsimprint content="M&T Books"><META name=vspublisher content="IDG Books Worldwide, Inc."><META name=vspubdate content="11/01/97"><META name=vscategory content="Web and Software Development: Programming, Scripting, and Markup Languages: Java"><TITLE>Java Digital Signal Processing:Java and Its Promise</TITLE>
<!-- HEADER --><STYLE type="text/css"> <!-- A:hover { color : Red; } --></STYLE><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<!--ISBN=1558515682//-->
<!--TITLE=Java Digital Signal Processing//-->
<!--AUTHOR=Douglas A. Lyon//-->
<!--PUBLISHER=IDG Books Worldwide, Inc.//-->
<!--IMPRINT=M & T Books//-->
<!--CHAPTER=1//-->
<!--PAGES=022-024//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="019-022.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="024-029.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H4 ALIGN="LEFT"><A NAME="Heading9"></A><FONT COLOR="#000077">The HTML Model</FONT></H4>
<P>On the Internet, there are computers that run Hypertext Transfer Protocol (HTTP) servers. HTTP servers typically send data in response to a Web browser request. Generally, the data can be in any format; the HTTP server typically does not decode the data. As a result, Internet HTTP servers provide a wide variety of interesting and wonderful data formats to various browser-based clients. New formats appear all the time. Browsers typically understand some variant of HTML, and this arrangement has led to the formation of the HTML model.
</P>
<P>In the HTML model, raw data is embedded in the HTML document by a hypertext reference (known as the <I>href</I> tag). To assist the browser in decoding the growing number of data formats, browsers use helper applications. In order to map the data to the correct helper application, browsers have a protocol that looks at the Multipurpose Internet Mail Extension (MIME) that the HTTP server transmits with the data. Based on the MIME, a lookup table determines how to decode and present the data. Figure 1.6 shows a screen capture of the presentation of one such table, known as the <I>helper window</I>.</P>
<P><A NAME="Fig6"></A><A HREF="javascript:displayWindow('images/01-06.jpg',369,243 )"><IMG SRC="images/01-06t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/01-06.jpg',369,243)"><FONT COLOR="#000077"><B>Figure 1.6</B></FONT></A> The Netscape helper window.</P>
<P>For each data type supplied by the HTTP server, there is a corresponding helper application, or <I>plug-in</I>. When this application is not present, the browser typically asks whether the user wants to save the file format. One of the authors has more than 77 items listed in the Netscape helper window. Naturally, these items do not represent all the possible data formats a browser can handle. You can customize a browser to handle any data format by launching a helper application. Thus, there are no limits to the number of data formats that may be present on the Web or handled by a browser.</P>
<P>Data will often be presented to the user in a variety of electronic forms, a veritable electronic tower of Babel. Suppose, for example, that a Microsoft Word document is to be supplied via the Web. You could supply it as a Word document, but Word 5 on a Mac cannot read Word 6 or 7 documents. So you could supply it as an RTF (rich text format) file so that Word 5 would understand most of it. Distributing Word documents using RTF to a variety of Word versions has some drawbacks: Some formatting will be lost, and some people will not have Word available as a viewer.</P>
<P>Word documents are often converted to HTML, which can be viewed by browsers the world over. Unfortunately, current versions of HTML can represent equations and vector graphics only as GIF images (a popular raster file format). Furthermore, HTML does not maintain the page layout of the original document. We could use PostScript, which enables users to download and print the document. Unfortunately, users may not be able to edit the document, and not all PostScript files will print to all printers. Adobe has stepped in with Portable Document Format (PDF), which lets you view the document on the screen and print it to all printers (if you have Adobe Acrobat). The problem, however, is that the user may still not be able to edit the PDF document.</P>
<P>The preceding example shows the rationale for having a wide variety of formats on the Web server. Having to have a different helper application for decoding each of these formats is cumbersome, and it’s wasteful to store so many copies of the same content in different formats.</P>
<H4 ALIGN="LEFT"><A NAME="Heading10"></A><FONT COLOR="#000077">The Java Model</FONT></H4>
<P>The Java model fixes some of the problems with the HTML model, but the Java model has yet to gain full acceptance.
</P>
<P>In Java, compiled byte codes are stored in class files, which have a <I>.class</I> suffix. The class files are downloaded to the client’s class loader. After a verification phase, the Java virtual machine (JVM) will interpret the byte codes. The role of the Java compiler is shown in Figure 1.7.</P>
<P><A NAME="Fig7"></A><A HREF="javascript:displayWindow('images/01-07.jpg',457,79 )"><IMG SRC="images/01-07t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/01-07.jpg',457,79)"><FONT COLOR="#000077"><B>Figure 1.7</B></FONT></A> The role of the Java compiler.</P>
<P>Any browser with a JVM can load data decoders on demand. Imagine that you have a new image sequence compression scheme based on head-and-shoulders video. No one has your algorithm for decoding this new image format.
</P>
<P>With Java, an algorithm for decoding a new data format can be downloaded on demand. This means that the Web has become object-oriented in the sense that the data can be joined with the program to manipulate the data. The Java model is a vast improvement over the current state of affairs, which requires that we have a wide variety of decoders on our hard drives. The role of the Java model on the network is shown in Figure 1.8.</P>
<P><A NAME="Fig8"></A><A HREF="javascript:displayWindow('images/01-08.jpg',500,165 )"><IMG SRC="images/01-08t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/01-08.jpg',500,165)"><FONT COLOR="#000077"><B>Figure 1.8</B></FONT></A> The role of Java on the network.<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="019-022.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="024-029.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<hr width="90%" size="1" noshade><div align="center"><font face="Verdana,sans-serif" size="1">Copyright © <a href="/reference/idgbooks00001.html">IDG Books Worldwide, Inc.</a></font></div>
<!-- all of the reference materials (books) have the footer and subfoot reveresed --><!-- reference_subfoot = footer --><!-- reference_footer = subfoot --></BODY></HTML><!-- END FOOTER -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -