【正文】
ly activated while the HTML page is being displayed. Scripting languages tend to be reasonably easy to understand and, because they are simply text that is part of an HTML page, they load very quickly as part of the single server hit required to procure that page. The tradeoff is that your code is exposed for everyone to see (and steal). Generally, however, you aren’t doing amazingly sophisti cated things with scripting languages, so this is not too much of a hardship. This points out that the scripting languages used inside Web browsers are really intended to solve specific types of problems, primarily the creation of richer and more interactive graphical user interfaces (GUIs). However, a scripting language might solve 80 percent of the problems encountered in clientside programming. Your problems might very well fit pletely within that 80 percent, and since scripting languages can allow easier and faster development, you should probably consider a scripting language before looking 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。 the server starts a CGI program that discovers an error, formats an HTML page informing you of the error, and then sends the page back to you。Java and the Inter If Java is, in fact, yet another puter programming language, you may question why it is so important and why it is being promoted as a revolutionary step in puter programming. The answer isn’t immediately obvious if you’re in g from a traditional programming perspective. Although Java is very useful for solving traditional standalone programming problems, it is also important because it will solve programming problems on the World Wide Web. What is the Web? The Web can seem a bit of a mystery at first, with all this talk of “surfing,” “presence,” and “home pages.” It’s helpful to step back and see what it really is, but to do this you must understand client/server systems, another aspect of puting that’s full of confusing iss ues. Client/Server puting The primary idea of a client/server system is that you have a central repository of information— some kind of data, often in a database— that you want to distribute on demand to some set of people or machines. A key to the client/server concept is that the repository of information is centrally located so that it can be changed and so that those changes will propagate out to the information consumers. Taken together, the information repository, the software that distributes the information and the machine where the information and software reside is called the server. The software that resides on the remote machine, municates with the server, fetches the information, processes it, and then displays it on the remote machine is called the client. The basic concept of client/server puting, then, is not so plicated. The problems arise because you have a single server trying to serve many clients at once. Generally, a database management system is involved, so the designer “bala nces” the layout of data into tables for optimal use. In addition, systems often allow a client to insert new information into a server. This means you must ensure that one client’s new data doesn’t walk over another client’s new data, or that