admin管理员组

文章数量:1531374

2024年7月26日发(作者:)

计算机英汉翻译

外文原文

Introduction to Java

autor:Martin Ngobye.

source:Computing Static Slice for Java Programs

Java is designed to meet the challenges of application development in the

context of heterogeneous, network-wide distributed environments. Paramount

among these challenges is secure delivery of applications that consume the

minimum of system resources, can run on any hardware and software platform,

and can be extended dynamically.

Java originated as part of a research project to develop advanced software

for a wide variety of network devices and embedded systems. The goal was to

develop a small, reliable, portable, distributed, real-time operating platform.

When the project started, C++ was the language of choice. But over time the

difficulties encountered with C++ grew to the point where the problems could

best be addressed by creating an entirely new language platform. Design and

architecture decisions drew from a variety of languages such as Eiffel,

SmallTalk, Objective C, and Cedar/Mesa. The result is a language platform that

has proven ideal for developing secure, distributed, network

based

end-user

applications

in

environments

ranging

from

network-embedded devices to the World-Wide Web and the desktop.

The design requirements of Java are driven by the nature of the computing

environments in which software must be deployed.

The massive growth of the Internet and the World-Wide Web leads us to a

completely new way of looking at development and distribution of software. To

live in the world of electronic commerce and distribution, Java must enable

the development of secure, high performance, and highly robust applications on

multiple platforms in heterogeneous, distributed networks.

Operating on multiple platforms in heterogeneous networks invalidates the

traditional schemes of binary distribution, release, upgrade, patch, and so on.

To survive in this jungle, Java must be architecture neutral, portable, and

dynamically adaptable.

The Java system that emerged to meet these needs is simple, so it can be

easily programmed by most developers; familiar, so that current developers can

easily learn Java; object oriented, to take advantage of modern software

development

methodologies and to fit into distributed client-server applications;

multithreaded, for high performance in applications that need to perform

multiple concurrent activities, such as multimedia; and interpreted, for

maximum portability and dynamic capabilities.

Together, the above requirements comprise quite a collection of buzzwords,

so let’s examine some of them and their respective benefits before going on.

What’s completely new is the manner in which Java and its run-time system

have combined them to produce a flexible and powerful programming system..

Developing your applications using Java results in software that is

portable across multiple machine architectures, operating systems, and

graphical user interfaces, secure, and high performance, With Java, your job

as a software developer is much easier―you focus your full attention on the

end goal of shipping innovative products on time, based on the solid

foundation of Java. The better way to develop software is here, now, brought

to you by the Java language platform.

Very dynamic languages like Lisp, TCL, and SmallTalk are often used for

prototyping. One of the reasons for their success at this is that they are

very robust―you don’t have to worry about freeing or corrupting memory.

Similarly, programmers can be relatively fearless about dealing with

memory when programming in Java, The garbage collection system makes the

programmer’s job vastly easier; with the burden of memory management taken

off the programmer’s shoulders, storage allocation errors go away. Another

reason commonly given that languages like Lisp, TCL, and SmallTalk are good

for prototyping is that they don’t require you to pin down decisions early

on―these languages are semantically rich.

Java has exactly the opposite property: it forces you to make explicit

choices. Along with these choices come a lot of assistance―you can write

method invocations and, if you get something wrong, you get told about it at

compile time. You don’t have to worry about method invocation error.

中文翻译

JAVA介绍 作者:Martin Ngobye.

出处:Computing Static Slice for Java Programs

Java是被设计用来解决在上下文分布式的异构网络中应用程序开发的问题。在这些复

杂问题中,首要的是安全发布应用程序、消耗最小的系统资源、可以在任何硬件和软件平

台上运行以及被动态地扩展。

Java最初是作为研发方案的一部分而开发的,这个研究方案是为了给广阔多样的网络

设备和嵌入式系统开发高级的软件。目标是开发一个小巧的、可靠性高的、可移植的、分

布式的、实时的操作系统平台。当这个方案开始的时候,C++是精选的语言,但是过了一

段时间,用C++语言遇到的困难也随之增长,解决这些问题最好的办法是创造一个全新的

语言平台。设计和体系结构的决定汲取了多种语言,例如Eiffel、 SmallTalk,、

Objective C以及 Cedar/Mesa。结果证明这个语言平台是理想的,对于开发一个可靠性高

的、可移植的、分布式的、基于终端用户网络的应用程序在多种环境中广泛搜索从嵌入网

络的设备到万维网和桌上型电脑。

Java的需求设计通过自然状态的,在软件必须被配置的处理环境中被推动的。

因特网和万维网的巨大发展导致我们完全地以新的情形着眼于开发和发行软件。对于

全球电子化的商业和销售发行的存在,Java必须使安全的,高性能的和非常健壮的应用程

序在多平台异构的,分布式的网络中开发。

在异构的网络中,多平台上运行会使传统配置的二进制发送、释放、更新、补丁等等

无效。为了在这些问题中幸存下来,Java必须是体系结构中立的、可移植的以及可以被动

态的修改。

为满足以上的需求而开发的Java系统是简单的,所以它能够被绝大多数的程序员进

行编程;熟悉的,所以当前的程序员学习Java语言是简单的;面向对象的,为了利用现

代的软件开发方法学和适合分布式的客户机/服务器应用程序;多线程的,为了高性能在

应用程序中需要执行多个并发的活动,例如多媒体;解释的,为了最大极限的可移植和动

态的容量。

同时,以上的需求完全是由收集的时髦词语组成的,所以在开始以前让我们来查看它

们中的一些和它们的各自的优点。

什么是完全新的,样式风格在Java语言和它的运行系统结合它们来产生一个灵通的

且强大的编程系统。

在软件中,用Java语言开发的你的应用程序可以在多种机器总体结构、操作系统和

图形用户接口之间移植。运用Java语言,诸如软件开发者的工作就会变得简单的多――

你会把你的全部精力都集中在最终的目标:准时运送革新的产品、基于可靠的构造的Java

语言。较好的开发软件的方法在这里,现在,Java语言平台会带给你这些。

许多动态的语言像Lisp、TCL和 SmallTalk通常被应用于原型构造技术它们成功原因

中的一个在于它们非常健壮――你没有必要去担心关于解除或破坏存储器。

同样的,程序员可以相对大胆的处理存储器,当在Java语言里面编程的时候。垃圾

回收系统使程序员的工作大为容易,卸下了程序员肩上存储管理之负担,存储分配错误不

再发生。

一般认为像Lisp, TCL, 和 SmallTalk这样一些语言十分适合于原型法的另一个理由,

是因为它们不要求你受早期决定的约束――这些语言的语义是很丰富的。

Java语言有着严密的对应的属性:它促使你做出清楚的选择。伴随着这些选择带来了

许多的协助――你可以写一个方法调用,而且如果你在编写时有一些错误的时候,在编译

的时候将会被告知。你没有必要去担心关于方法调用的错误。

Java and the Internet

If a scripting language can solve 80 percent of the client-side

programming problems, what about the other 20 percent―the “really hard

stuff?” The most popular solution today is Java. Not only is it a powerful

programming language built to be secure, cross-platform, 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, network

programming, and distributed computing. Java allows client-side programming

via the applet.

An applet is a mini-program 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

computers that have browsers with built-in Java interpreters. (This safely

includes the vast majority of machines.) Since Java is a full-fledged

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 Internet to discover that you’ve gotten a date or

some other parameter wrong, and your client computer 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 network traffic and load on servers can be

reduced, preventing the entire Internet from slowing down.

One advantage a Java applet has over a scripted program is that it’s in

compiled form, so the source code isn’t available to the client. On the other

hand, a Java applet can be decompiled 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 compiled Java applet can comprise many

modules and take multiple server “hits” (accesses) to download. (In Java 1.1

and higher this is minimized by Java archives, called JAR files, that allow

all the required modules to be packaged together and compressed for a single

download.) 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 all-important 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, 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 committing to

Java, since they might fit your needs handily and you’ll be more productive

run its applets withi

感谢您的阅读,祝您生活愉快。

本文标签: 语言开发平台