英语文献翻译网上商城java内容摘要:

ng at a more involved solution such as Java or ActiveX programming. The most monly discussed browser scripting languages are JavaScript (which has nothing to do with Java。 it’s named that way just to grab some of Java’s marketing momentum), VBScript (which looks like Visual BASIC), and Tcl/Tk, which es from the popular crossplatform GUIbuilding language. There are others out there, and no doubt more in development. JavaScript is probably the most monly supported. It es built into both Netscape Navigator and the Microsoft Inter Explorer (IE). Unfortunately, the flavor of JavaScript on the two browsers can vary widely (the Mozilla browser, freely downloadable from , supports the ECMAScript standard, which may one day bee universally supported). In addition, there are probably more JavaScript books available than there are for the other browser languages, and some tools automatically create pages using JavaScript. However, if you’re already fluent in Visual BASIC or Tcl/Tk, you’ll be more productive using those scripting languages rather than learning a new one. (You’ll have your hands full dealing with the Web issues already.) If a scripting language can solve 80 percent of the clientside programming problems, what about the other 20 percent—the “really hard stuff?” Java is a popular solution for this. Not only is it a powerful programming language built to be secure, crossplatform, and international, but Java is being continually extended to provide language features and libraries that elegantly handle problems that are difficult in traditional programming languages, such as multithreading, database access, work programming, and distributed puting. Java allows clientside programming via the applet and with Java Web Start. An applet is a miniprogram that will run only under a Web browser. The applet is downloaded automatically as part of a Web page (just as, for example, a graphic is automatically downloaded). When the applet is activated, it executes a program. This is part of its beauty—it provides you with a way to automatically distribute the client software from the server at the time the user needs the client software, and no sooner. The user gets the latest version of the client software without fail and without difficult reinstallation. Because of the way Java is designed, the programmer needs to create only a single program, and that program automatically works with all puters that have browsers with builtin Java interpreters. (This safely includes the vast majority of machines.) Since Java is a fullfledged programming language, you can do as much work as possible on the client before and after making requests of the server. For example, you won’t need to send a request form across the Inter to discover that you’ve gotten a date or some other parameter wrong, and your client puter can quickly do the work of plotting data instead of waiting for the server to make a plot and ship a graphic image back to you. Not only do you get the immediate win of speed and responsiveness, but the general work traffic and load on servers can be reduced, preventing the entire Inter from slowing down. One advantage a Java applet has over a scripted program is that it’s in piled form, so the source code isn’t available to the client. On the other hand, a Java applet can be depiled without too much trouble, but hiding your code is often not an important issue. Two other factors can be important. As you will see later in this book, a piled Java applet can require extra time to download, if it is large. A scripted program will just be integrated into the Web page as part of its text (and will generally be smaller and reduce server hits). This could be important to the responsiveness of your Web site. Another factor is the allimportant learning curve. Regardless of what you’ve heard, Java is not a trivial language to learn. If you’re a VISUAL BASIC programmer, moving to VBScript will be your fastest solution (assuming you can constrain your customers to Windows platforms), and since it will probably solve most typical client/server problems, you might be hard pressed to justify learning Java. If you’re experienced with a scripting language you will certainly benefit from looking at JavaScript or VBScript before mitting to Java, because they might fit your needs handily and you’ll be more productive sooner. Automatically downloading and running programs across the Inter can sound like a virusbuilder’s dream. If you click on a Web site, you might automatically download any number of things along with the HTML page: GIF files, script code, piled Java code, and ActiveX ponents. Some of these are benign。 GIF files can’t do any harm, and scripting languages are generally limited in what they can do. Java was also designed to run its applets within a “sandbox” of safety, which prevents it from writing to disk or accessing memory outside the sandbox. Microsoft’s ActiveX is at the opposite end of the spectrum. Programming with ActiveX is like programming Windows—you can do anything you want. So if you click on a page that downloads an ActiveX ponent, that ponent might cause damage to the files on your disk. Of course, programs that you load onto your puter that are not restricted to running inside a Web browser can do the same thing. Viruses downloaded from BulletinBoard Systems (BBSs) have long been . The solution seems to be “digital signatures,” whereby code is verified to show who the author is. This is based on the idea that a virus works because its creator can be anonymous, so if you remove the anonymity, individuals will be forced to be responsible for their actions. This seems like a good plan because it allows programs to be much more functional, and I suspect it will eliminate malicious mischief. If, ho。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。