JAVA外文文献翻译

J A V A外文文献翻译Last revision on 21 December 2020

中文翻译

基于Java技术的Web应用设计模型的比较研究

来源:School of Computer Science and Engineering University of New South Wales Sydney, NSW 2052, Australia

作者:Budi Kurniawan and Jingling Xue

摘要

Servlet技术是在建立可扩展性Web应用中被应用最广泛的技术。在运用JAVA技术开发Web应用中有四种模型,分别是:Model 1、Model 2、Struts和JavaServer Faces JSF。Model 1使用一连串的JSP页面,Model 2采用了模型,视图,控制器MVC模式。Struts是一个采用了Model 2设计模型的框架,JSF是一种支持ready-to-use组件来进行快速Web应用开发的新技术。Model 1对于中等和大型的应用来说很难维护,所以不推荐使用。本文通过利用Model 2、Struts和JSF这三种模型分别构建三个不同版本的在线商店应用程序来比较和评价这三种模型在应用程序开发和性能上的差异。

1.绪论

当今Web应用是一种展现动态内容的最普遍的方式。构建Web应用有许多种方法,其中最流行的是Servlet技术。这种技术的流行是因为它比CGI、PHP等其他技术更具优越性。然而Servlet对于开发来说还是麻烦的,因为它在传送HTML标签时需要程序员将他们组合成为一个字符串对象,再将这个对象传给浏览器。同样的,对于输出的一个很小的改动也要求Servlet被重新编译。基于这个原因SUN公司发明了JavaServer Pages JSP技术。JSP允许HTML标签和Java代码混合在一起,每个页面将被转化为一个Servlet,一个JSP就是一个Servlet,而且编译将在JSP页面第一次被请求时自动进行改变输出也不需要重新编译。另外通过使用JavaBean和定制标签库,JSP能够将表示与业务逻辑相分离。现今基于JAVA的Web应用开发标准是将servlets与JSP结合在一起。随后出现了许多种设计模型用来构建servlet/JSP应用。Model 1、Model 2、Struts]和JavaServer Faces JSF。Model 1和Model 2最早是在JSP规范中被提及的。Model 1只使用JSP而不使用servlet,Model 2则结合了JSP与servlet。Model 1和Model 2的使用是有条件的。Model 1适合与开发原型和非常小的应用,Model 2则是开发中型和大型应用推荐的设计模型。由于

Model 2越来越被行业所接受,一个建立Struts框架的开源项目也因此被启动了。Struts通过为Model 2提供了模型、视图、控制器中的控制器来完善Model 2。

另外Struts提供了更好的页面导航管理机制和一些定制标签库,能够进行更快速的开发。尽管它学习难度大,并且实际上它没有在任何的规范中被定义,但是它还是作为Model 2的一种替代获得了流行。JavaServer Faces是在JCP的JSR-127规范下被建立。Sun公司力推这项技术,希望它能够成为构建Java Web应用的最终模型。JSF最重要的特性是对ready-to-use组件的支持,比如,可扩展用户接口组件、简易的页面导航、输入验证、数据转换和JavaBean管理机制。servlet/JSP程序员面临的问题是选择最合适的设计模型。明显的JSF在开发时间上提供了更好的解决方案。然而,有些人担心实施JSF的开销所带来的性能下降而不愿采用这种技术。

我们使用Model 2、 Struts和JSF分别构建三个不同版本的在线商店应用比较的参数是代码的行数、类的数目和性能测试结果。

我们研究哪种设计模型能够进行最快速的开发。我们评估基于这些模型的应用的性能。我们提供一些建议来完善现有的设计模型使得开发速度更快。

文章的余下部分组织如下

第二部分讨论了Web开发中的问题,第三部分解释了三个设计模型如何来解决这些开发问题,第四部分详细介绍了试验所需要的硬件和软件,第五部分给出试验的结果并进行分析,第六部分回顾相关工作,第七部分得出结论并提出了一些改进现有设计模型的建议。

2.Web开发中的问题

所有的Java开发都使用Servlet技术作为基础技术。同样的所有的Java Web应用都有一些问题需要解决:

1.用户接口是在客户浏览器上呈现出的HTML标签。任何在应用中使用的服务器端组件都必须被编码成为正确的HTML标签。除了显示内容和数据外,用户接口还负责接收用户的输入。

2.用户的输入必须要验证。输入的验证有两种类型:服务器端和客户端。顾名思义,服务器端的输入验证是在输入的数据到达服务器后在服务器上进行的。客户端的输入验证是在浏览器上完成的,一般使用JavaScript或其他脚本语言。利用客户端进行输入验证的好处是反应迅速,而且能够减轻服务器的负载。无论是否存在客户端输入验证,服务器端的输入验证是一定要执行的。因为无法保证用户的浏览器的脚本

3.在基于Java的Web应用中模型对象是以JavaBean的形式出项的。模型对象组成了基于MVC设计模型的模型部分。一个模型对象能够用来绑定一个组件的值以备下阶段使用。此外它能够封装需要执行的业务逻辑。

4.大多数的Web应用都包含多个页面,能够使用户从一个页面跳转到另一个页面。所有的基于MVC的设计模式都使用Servlet作为控制部分。这个Servlet也作为进入应用的唯一入口。当前的请求之后哪个页面会被显示取决于请求参数的具体值。管理页面导航是至关重要的。

3.Web应用设计模型

Model 2设计模型是基于模型、视图、控制器、MVC设计模式的。正如Burbeck 所解释的,在MVC中有三个主要模块:控制器、视图和模型。控制器作为应用的中心,所有的用户交互都要通过它。视图包含了应用的显示,而模型用来存储数据和封装应用的业务逻辑。随后,Struts框架提供了一个通用框架能够容易的构建Model 2应用。最主动的是同样使用MVC设计模式的JSF。在之后的章节,我们将来讨论这三种设计模型,并且说明每一种设计模型是怎样来解决之前提到的开发问题。

Model 2

一个基于Model 2设计模型的Java Web应用有一个作为控制部分的servlet称为控制器servlet。所有的请求首先被这个servlet处理,它通过RequestDispatcher 对象将请求迅速的分派到合适的视图。在Model 2中视图是通过JSP页面来表现的。JavaBean作为Model 2 的模型部分,用来在应用中存储数据。除了存储数据JavaBean还用来封装业务逻辑。每个HTTP请求都带有一个行为参数,用来指出哪个视图指派给这个请求。程序员必须在所有的JSP页面中为用户接口编写HTML标签代码,并且编写输入验证代码。此外,模型对象被单独的JSP页面所管理。

Struts Struts

框架是Model 2设计模型的一个改进。它提供了一个默认的控制器servlet使得程序员不用非得去编写一个。Struts允许在应用配置文件一个XML文件中编写导航规则来减轻页面导航的任务,改变导航规则不需要重新编译。除了更简单的页面导航,Struts还提供了定制标签库来定义标签代表HTML元素。这些标签中的一些用来处理异常,而且Struts支持国际化,能够显示本地化的错误消息。就像Model 2一样,Struts使用JavaBean作为模型。此外Struts程序员必须编写输入验证代码。

JSF

JSF同样使用了一个控制器servlet称为FacesServlet。这个Servlet是整个JSF应用的唯一入口。JSF同样使用JSP页面作为它的视图,使用JavaBean作为模型对象。与Model 2和Struts不同,JSF提供了能够写入JSP页面的ready-to-use的用户接口组件。在JSF应用中的页面的调用,FacesServlet建立了一个组件树来显示JSP页面的请求。大部分的组件还能够触发事件来构成JSF的事件驱动。对于页面导航,JSF使用了和Struts类似的方法,即允许在一个应用控制文件,XML文件中定义导航规则。

JSF应用与非JSF的servlet/JSP应用的不同在于JSF是事件驱动的。JSF的用户接口是一个或多个JSP页面,用来服务诸如表单和输入框等Web组件。这些组件以JSF定制标签的形式出现而且能够保存数据。一个组件能够嵌套在另一个组件中,有可能形成一个组件的树状结构。在普通的servlet/JSP应用中,使用JavaBean来存储用户输入的数据。

4.运行环境

以下是我们实验的软硬件详细描述。

Servlet容器

Java Web应用是在servlet容器中运行的,在应用中它一个引擎用来处理接踵而来的请求资源的HTTP请求。在这个试验项目中,我们使用Tomcat——一个来自Apache软件基金会的开源的servlet容器,版本号是。基本上一个servlet容器通过执行下面的任务来处理一个servlet:

创建一个HttpRequest对象

创建一个HttpResponse对象

传递HttpRequest、HttpResponse对象来调用Servlet接口的service方法

测试用客户端

为了进行性能测试,我们使用同样来自Apache软件基金会的来模拟多用户。JMeter允许用户选择一定数量的线程来执行测试。每个线程模拟了一个不同的用户。JMeter来能允许我们选择完成一次测试的测试次数。使用JMeter来测试一个Web应用。你只要直接向某个IP地址、上下文路径和端口号发出请求。你也可以将请求参数包含在HTTP请求中。对于一个测试,JMeter将服务器的响应时间以毫秒的形式输出。从响应时间,我们能够得到服务器执行服务的每秒命中次数。

硬件

为了得到最大的性能度量精度,我们使用不同的计算机来进行应用的测试。运行应用的是一台XP计算机,它的配置如下:Intel Core 1GHz CPU 、1G RAM。测试用客户端是运行JMeter的Windows2000计算机,具体配置如下:Intel Core 1GHz CPU、1G RAM。

5.结论

我们得到两类实验结果:开发的难易程度和性能。开发的难易程度比较了类的数目和代码的行数。这些数目显示了遵从某个设计模型来开发一个应用的难易程度。一个应用包含较少的类和较少的代码行数说明应用相对而言更容易构建。一个应用包含较多的类说明应用需要花费更多的时间来开发。

性能度量结果是通过比较这两个操作来获得的。查找操作是一个应用中最普通的操作以及浏览操作。

应用开发的难易程度

就如表1显示的,应用Model 2设计模型需要花费最多的努力。使用Struts能

表1 应用中类的数目和代码行数

Model 2 设计模型的特点是存在一个控制器servlet和多个JavaBean类,作为模型及JSP页面作为视图。控制器类通过一系列的if语句来负责页面导航规则。Model 2程序员还必须为输入验证编写代码,在这个实验中是通过在内部编写许多定制标签库来完成的。在Model 2设计模型中的其它类是定制标签库,这些标签是用来

负责输入验证和数据显示的。实际上输入验证使用了590行代码,大约是所有代码的30%。

在Struts应用中,控制器servlet是由框架提供的,所以Struts程序员不用编写它,节省了时间。然而,他仍然需要在应用控制文件中编写导航规则,这比编写一个servlet容易些,因为应用控制文件可以用文本编辑器编辑,不必编译。虽然Struts框架提供了错误处理机制,但仍然需要手工编写输入验证。用来进行输入验证的类的数量和代码的行数与Model 2应用的很相似。Struts中其他的类是Action 类用来调度请求到默认的控制servlet。

在JSF中,提供使用验证组件而不用编写输入验证。所以JSF应用开发人员可以跳过这个任务。此外页面导航和Struts相同,都是使用一个应用控制文件。在JSF 中其他的类是ContextListener、ActionListener和数据库工具类。

性能度量

对于每一个操作,通过1-10个并发用户,我们来测量服务器的响应时间(以毫秒形式)每个用户在JMeter中设定了一定数量的线程。每次测试进行10次,取平均值。每个操作在下面的章节中讨论。

查询操作

查询操作,其名称或描述与关键字匹配。它将执行一个SQL的SELECT语句。图2比较了三个版本的应用的查询操作。

图2 查询操作的性能比较

在Model 2应用中,对于一个用户,服务器平均的响应时间是173毫秒,对于10个用户是919毫秒。在Struts应用中,相对地,其值是189毫秒和900毫秒,在JSF中则是210毫秒和932毫秒。响应时间随着并发用户数成比例的增加,说明了服务器仍然能够应付装载。

Model 2应用开销最小,所以它的平均性能比Struts和JSF更好。然而,Struts 的性能同Model2 的相同,这是因为服务器有足够的内存用来加载运行Struts需要的Struts库。同时,应该注意到Struts中的页面导航规则是加载和存储在一个叫ActionMapping的对象中。因此,给出一个请求参数,导航到下个页面是通过查找得到的。另一方面,给出一个请求参数,Model 2应用是利用一系列的if语句来得到下一个页面的导航。

在几乎所有的并发用户数字中,JSF应用的性能都稍逊于其他应用。这可能是由于JSF将时间消耗在为每个请求构建一颗组件树上。但JSF的服务器响应时间与其他应用差距并不明显。

浏览操作

三个版本的浏览操作,如同查询操作,将执行一个SQL SELECT语句。图3这个操作的测试结果。

图3 浏览的性能比较

平均来说,Model 2应用的性能最好,因为它具有最少的开销。对于是一个用户服务器的平均响应时间是111毫秒,10个用户是899毫秒。Struts应用有着同样的性能,对于是一个用户服务器的平均响应时间是180毫秒,10个用户是920毫秒。JSF则稍落后与其他两个应用,相对地,它的时间是190毫秒和1009毫秒。响应时

间随着并发用户数成比例的增加,意味着服务器能很好地服务这些用户。浏览地平均性能测量结果同查询操作很相似,这是因为这两种数据库操作类似。

6.相关工作

使用servlet、PHP(版本 3)、通用网关接口(CGI)来比较基于数据库的Web应用的性能。经过执行从MySQL数据库返回数据的一系列的基准测试,发现Java

servlet使用持久数据库连接的方案性能最佳。PHP3使用持久数据库连接相对于CGI 方案而言性能相当不,也同样提到了使用Java servlet的优势。根据这些作者,Java servlet是迎合电子商务(比如在线商店)需求的最佳选择,而且能够在高交互式模式中处理客户请求。

比较PHP4、Java servlet、和EJB。使用两个应用来测试了这三种结构,研究显

示了PHP4比Java servlet更有效,而EJB的性能比servlet差。然而,注意到作为Java方案的一部分的servlet提供了适应性,能够移植到不同操作系统的其他系统上。

7.结论

我们发现使用JSF构建Web应用最迅速:Model 2最慢但性能最好;Struts应用

在计较中处于其他两种设计模型中间。

我们提出了一些建议用来大体上改善Servlet技术和增强基于这些设计模式的应用的性能。

1.Struts没有基于任何规范,也没有文档来讨论它的内部工作方式。因此,很

2.Servlet技术,规范没有定义任何的缓存机制,也没有在即将到来的中提及。

尽管Web应用的内容具有动态性,但有写内容也不是经常去改变了。比如,在在线商店的应用中,用户可以浏览的商品种类可能每隔一个月才变动一次。如果这些半静态的内容必须每次在需要的时候从数据库中获取,将浪费大量的编程资源。Servlet程序员通过编写一个对象缓存某些内容来实现缓存。然而,只要没有缓存标准,许多程序员将反复的写相同的代码段。

3.Model 2主要的缺点是页面导航规则在控制器servlet中是硬编码的。这意味

着程序流程的任何微小的改动就需要控制器servlet重新编译。解决这个问题的方法是在应用启动时,提供一个映射器来读取页面导航规则。在控制器

servlet的init方法中很容易添加代码。这个方法只执行一次,就是在

servlet首次被载入内存的时候。如果属性文件在每次改动后需要重新读取,程序员可以在每次请求时检查属性文件的时间戳,将它于先前读入的文件比

较。如果它比之前读入的文件的时间戳更新,则重新构建映射器。这个特性可以在上下文对象的初始化参数中开启或者关闭。从开发的角度来讲,这个特性应该开启。在部署时,这个特性应该关闭。使用属性文件来存储页面导航规则还可能避免在控制器中的一连串的if语句,它将在每次请求时消耗时间。可以使用一个HashMap,将请求参数作为Key值,将跳转页面作为Value值。这个

设计模型的另一个缺陷是缺少标准的输入验证组件和用户接口组件,而这些将在JSF中得到解决。

4.JSF解决了开发Web应用中的大部分问题,比如:页面导航管理、用户接口组

件和输入验证组件。然而,由于这项技术仍然很年轻,还没有太多的用户接口可用,强迫了程序员将JSF和非JSF的servlets/JSP页面相结合。JSF是事

件驱动的,JSF程序员通过编写事件监听来决定JSF应用的行为,就像Swing 应用中的监听器一样。在JSF 版本中,通常有两类事件能够被触

发:ActionEvent和ValueChangedEvent,但这已经能在应用和用户之间提供足够好的交互性了。

参考文献

1. Burbeck, S., Applications Programming in Smalltalk-80: How to use Model-View-

2. Cecchet, E., Chanda A., Elnikety S., Marguerite J., Zwaenepoel W.: Performance

Comparison of Middleware Architectures for Generating Dynamic Web Content.

Proceeding of the 4th International Middelware Conference, 2003.

3. Cecchet, E., Marguerite, J., and Zwaenepoel, W.: Performance and Scalability of EJB

Applications. Proceedings of OOPSLA’02, 2002.

4. Java Servlet and JavaServer Pages Specification (JSR-053),

5. Java Servlet Specification (Proposed Final Draft 3),

10. Sun Microsystems, Comparing Methods for Server-Side Dynamic Content,

13. Wu, A., Wang, H., and Wilkins, D.: Performance Comparison of Alternative Solutions forWeb-To-Database Applications. Proceedings of the Southern Conference on Computing,the University of Southern Mississippi, 2000.

英文原文

A Comparative Study of Web Application Design Models Using the Java

Technologies

Budi Kurniawan and Jingling Xue

School of Computer Science and Engineering

University of New South Wales Sydney, NSW 2052, Australia

Abstract.

The Servlet technology has been the most widely used technology for building scalable Web applications. In the events, there are four design models for developing Web applications using the Java technologies: Model 1, Model2, Struts, and JavaServer Faces (JSF). Model 1 employs a series of JSP pages; Model 2 adopts the Model-View-Controller pattern; Struts is a framework employing the Model 2 design model; and JSF is a new technology that supports ready-to-use components for rapid Web application development. Model 1 is not recommended for medium-sized and large applications as it introduces maintenance nightmare. This paper compares and evaluates the ease of application development and the performance of the three design models (Model 2, Struts, and JSF) by building three versions of an online store application using each of the three design models, respectively.

1.Introduction

Today, Web applications are the most common applications for presenting dynamic

contents. There are a number of technologies for building Web applications, the most popular of which is the Servlet technology . This technology gains its popularity from its superiority over other technologies such as CGI and PHP .Servlets are cumbersome to develop, however, because sending HTML tags requires the programmer to compose them into a String object and send this object to the browser. Also, a minor change to the output requires the servlet to be recompiled. To address this issue, Sun Microsystems invented JavaServer Pages (JSP) . JSP allows HTML tags to be intertwined with Java code and each page is translated into a servlet. A JSP page is a servlet. However, compilation occurs automatically when the page is first requested. As a result, changing the output does not need recompilation. In addition, JSP enables the separation of presentation from the business logic through the use of JavaBeans and custom tag libraries. The norm now in developing Javabased Web applications is to use servlets along with JavaServer Pages.

In the later development, there are a number of design models for building

servlet/JSP applications: Model 1, Model 2, Struts , and JSF . Model 1 and Model 2 were first mentioned in the early specifications of JSP. Model 1 strictly uses JSP pages, with no servlets, and Model 2 uses the combination of both servlets and JSP pages. The terms of Model 1 and Model 2 have been used ever since. Model 1 is suitable for prototypes and very small applications, and Model 2 is the recommended design model for medium sized and large applications.

As Model 2 gained more acceptances in the industry, an open source initiative to build the Struts Framework was initiated. Struts perfects Model 2 by providing the controller part of the Model-View-Controller of Model 2. In addition, Struts provides better page navigation management and several custom tag libraries for more rapid development. Despite its steep learning curve and the fact that it was never defined in any specification, Struts has been gaining popularity as the alternative to Model 2.

JavaServer Faces [6] is built under the Java Community Process under JSR-127. Sun Microsystems proposed this technology in the hope that JSF will be the ultimate model for building Java Web applications. The most important feature of JSF is the availability of ready-to-use components such as extensible UI components, easy page navigation, input validators, data converters and JavaBeans management.

The problem facing servlet/JSP programmers are to choose the most appropriate design model. Clearly, JSF provides a better solution in regard to development , some people are not sanguine to adopt this technology for fear of performance penalty due to the overhead of the JSF implementation.

We build three versions of an online store application named BuyDirect using Model 2, Struts and JSF. The parameters compared are the number of lines of code,the number of classes, and the performance measurement results. We investigate which of the design models allows the most rapid development process. We evaluate the performances of the applications built upon these models. We provide some suggestions to perfect the existing design models to make development more rapid.

The rest of the paper is organised as follows. Section 2 discusses the issues in Web development. Section 3 explains how the three design models address these development issues. Section 4 provides the details of the hardware and software used in these experiments. Section 5 presents the experiment results and analysis. Section 6 reviews the related work. Section 7 concludes by offering some suggestions to improve the existing design models.

2.Java Web Development Issues

All Java Web development uses the Servlet technology as the underlying technology. As such, all Java Web applications have certain issues that need to be addressed: User Interface. The user interface is what the client browser renders as HTML tags. Any server-side component used in the application must be encoded into the corresponding HTML elements. Besides for displaying the content and data, the user interface is also responsible in receiving input from the user.

Input Validation. User input needs to be validated. There are two types of input validation, server-side and client-side. As the name implies, the server-side input validation is performed on the server after the input reaches the server. Client-side input validation is done on the browser, usually by using JavaScript or other scripting languages. The advantages of using client-side input validation are prompt response and reducing the server workload. The server-side input validation should always be performed regardless the

presence of client-side validation because there is no guarantee the user browser's scripting feature is being on and malicious users can easily work around client-side validation.

Model Objects. Model objects in Java-based Web applications are in the forms of JavaBeans. Model objects make up the Model part of the MVC based design model. A model object can be used to bind a component value to be used at a later stage. In addition, it can encapsulate business logic required for processing.

Page Navigation. Almost all Web applications have multiple pages that the user can navigate from one to another. All MVC-based design models use a servlet as the Controller part. This servlet also acts as the sole entry point to the application. Which page to be displayed after the current request is determined by the value of a specified request parameter. Managing page navigation is critically important.

3.Web Application Design Models

The Model 2 design model is based on the Model-View-Controller (MVC) design pattern. As explained by Burbeck [1], there are three main modules in MVC, the Controller, the View, and the Model. The Controller acts as the central entry point to the application. All user interactions go through this controller. The View contains the presentation part of the application, and the Model stores data or encapsulates business logic of the application. In the later development, the Struts Framework provides a common framework to easily build Model 2 applications. Then, the last initiative is the JavaServer Faces, which also employs the MVC design pattern.

In the following sections, we discuss these three design models and explain how each design model addresses the development issues specified in the previous section.

3.1Model 2

A Java Web application that is based on the Model 2 design model has one servlet (called the Controller servlet) that serves as the Controller part. All requests are first handled by this servlet, which immediately dispatches the requests to the appropriate views using RequestDispatcher objects. Views in the Model 2 design model are represented by JSP pages. To store data, a Model 2 application uses JavaBeans, which are the Model part of the

application. In addition to storing data, the JavaBeans also encapsulate business logic. Each HTTP request carries an action parameter that indicates which view to dispatch this request to. The programmer must code the HTML tags for user interface in all JSP pages in the application and write input validation code. In addition, the model objects are managed by individual JSP pages.

3.2Struts

The Struts Framework is an improvement of the Model 2 design model. It provides a default Controller servlet so that the user does not have to write and compile one. Struts alleviates the task of page navigation by allowing navigation rules to be present in its application configuration file (an XML document). Changes to the navigation rules do not require recompilation of a Java servlet class. In addition to easier page navigation, Struts provides custom tag libraries that define tags representing HTML elements. One of these tags is used for error handling and Struts is therefore capable of displaying localized error messages in support for internationalization. Struts applications use JavaBeans as their models, just like the Model 2 design model. In addition, Struts programmers have to write their own input validation code.

3.3JSF

JSF also employs a controller servlet that is called FacesServlet. This servlet is the only entry point to a JSF application. JSF also uses JSP pages as its views and JavaBeans as its model objects. Unlike Model 2 and Struts, however, JSF provides ready-to-use user interface components that can be written on JSP pages. Upon an invocation of a page of a JSF application, the FacesServlet constructs a component tree that represents the JSP page being requested. Some of the components can also trigger events, making JSF event-driven. For page navigation, JSF uses an approach similar to Struts, ., by allowing navigation rules to be defined in an application configuration file (again, an XML document).

What distinguishes a JSF application from non-JSF servlet/JSP application is that JSF applications are event-driven. The user interface of a JSF application is one or many JSP pages that host Web components such as forms and input boxes. These components are represented by JSF custom tags and can hold data. A component can be nested inside

another, and it is possible to draw a tree of components. Just as in normal servlet/JSP applications, you use JavaBeans to store the data the user entered.

4.Experimental Setup

The software and hardware details for our experiments are described below.

4.1The Online Store Application

The online store application in this research comes in three versions: Model 2, Struts, and JSF. All of them are named BuyDirect, an online store that sells electronics goods. The application has the following features:

- Search for certain products based on product names or descriptions.

- Browse the list of products by category.

- View a product's details

- Put a product into the shopping cart.

- View the shopping cart

- Check out and place an order.

This application represents the most common Web application that provides the following functionality:

- searching for certain information in the database

- browsing the data in the database,

- performing database transactions.

Data is stored in a MySQL database. The tables used and the relationship among them are depicted in Figure 1.

4.2The Servlet Container

A Java Web application runs in a servlet container, which is the engine that processes the incoming HTTP requests for the resources in the application. For this research project, we use Tomcat, an open source servlet container from the Apache Software Foundation. The version we use is [11].

Basically, a servlet container processes a servlet by performing the following tasks:

- Creating the HttpRequest Object

- Creating the HttpResponse Object

- Calling the service method of the Servlet interface, passing the HttpRequest and HttpResponse objects.

Testing Clients

For performance testing, we emulate multiple users using JMeter [9], also from the Apache Software Foundation. JMeter allows the user to choose the number of threads to perform testing. Each thread emulates a different user. JMeter also lets us choose how many times a test will be done. To test a Web application using JMeter, you direct requests to certain IP address, context path, and port number. You can also specify request parameters to be included in each HTTP request. As the output, JMeter notifies the response time of the server in milliseconds for a test. From the response time, we derive the number of

hits/seconds the server is capable of serving.

Hardware

We use different computers for running the applications and for testing, so as to obtain maximum performance measurement accuracy. The computer running the application is a Linux machine having the following hardware specifications: Intel Pentium III 750MHz CPU with 256MB RAM. The computer running the testing clients is a Windows 2000 machine running JMeter. The computer has the following specifications: Intel Pentium III 850MHz CPU with 256MB RAM.

5.Experimental Results

We obtain experimental results in two categories: the ease of development and performance. The ease of development category compares the number of classes and the number of lines of code. These numbers indicate how easy it is to develop an application by following a certain design model. An application with the fewer number of classes or the number of lines of code indicates that the application is relatively easier to build. The application with the more number of classes indicates that the application takes more time to develop.

The performance measurement results are obtained by comparing three operations in each version of the online store application: Search, Browse, and Shopping. The Search operation is the most common operation in such an application. The Browse operation displays products by category, and the Shopping operation is the most complex operation of all. It includes filling in the Order form and inserting products in the shopping cart to the database. The database is locked during the product insertion, so either all shopping items are stored in the database or none of them is.

5.1Ease of Application Development

As Table 1 shows, it takes the most effort to implement the Model 2 design model. Using Struts alleviates the problem a bit, and the best saving in the development comes if one uses JSF.

Table 1. The number of classes and the number of lines for the applications under study

The Model 2 design model is characterised by the presence of a Controller servlet and a number of JavaBeans classes (as the Model) and JSP pages (as the Views). The Controller servlet is responsible for page navigation rules that employ a series of if statements. Model 2 application programmers must also code for the input validation that in this research is implemented inside a number of custom tag libraries. The other classes in the Model 2 design model are custom tag library and the tag library descriptors responsible for input validation and data display. In fact, input validation takes 590 lines of code, or almost 30% of the total amount of code.

In the Struts application, the Controller servlet is provided by the framework, therefore a Struts programmer saves time for not having to write one. However, he/she still needs to write page navigation rules in the Application Configuration file, which is easier than writing a servlet because the Application Configuration file can be edited using a text editor and no compilation is necessary. Input validation must still be done manually, even though the Struts Framework provides an error handling mechanism. The number of classes and the number of lines of code for input validation are almost similar to the Model 2 application. In Struts, the other classes are Action classes to which the default Controller servlet dispatches requests.

In JSF input validation comes free through the availability of validator component. As a result, a JSF application developer can skip this task. In addition, page navigation takes the same course as Struts, . by utilising an Application Configuration file. The other classes in JSF are a ContextListener, an ActionListener, and a Database utility class.

5.2Performance Measurement

For each operation, we measure the server response time (in milliseconds) for 1 to 10 concurrent users. The number of users is specified by setting the number of threads in Jmeter. Each test is conducted 10 times and the average is taken. Each operation is discussed further is the following sub-sections.

5.2.1Search Operation

The Search operation retrieves all products whose name or description matches the keyword. There is one SQL SELECT statement performed. Figure 2 compares the three versions of applications for the Search operation.

For the Model 2 application, the average server response time for one user is 173 ms and for 10 users is 919 ms. For the Struts application, these numbers are 189 ms and 900 ms, respectively. For the application built using JSF, the average server response time is 210 ms for one user and 932ms for 10 users. The increase of the response time I proportional to the increase of the number of concurrent users, which means that the server is still able to cope with the load.

The Model 2 application has the least overhead, therefore the average performance should be better than the Struts and JSF applications. However, the Struts application performs as well as the Model 2 application. This is because the server has enough memory to load all Struts libraries required to run Struts. Also, note that page navigation rules in Struts are loaded and stored in an object called ActionMapping.Therefore, given an action request parameter, the next page of navigation is obtained through a look-up. On the other hand, the Model 2 application uses a series of if statements to find the next page of navigation, given the action request parameter.

The JSF application performs slightly worse than the other applications in almost all numbers of concurrent users. This could be due to the time taken by the JSF implementation

to construct a component tree for each page requested. However, the difference in server response time between JSF and other applications is not that significant.

5.2.2Browse Operation

The Browse operation retrieves all products belonging to the specified category for the three versions of applications. Like the Search operation, there is one SQL SELECT statement performed. Figure 3 gives the test results for this operation.

On average, the Model 2 application performs the best because it has the least overhead. The average server response time is 111 ms for one user and 899 ms for 10 users. The Struts application has comparable performance, with one user average server response time of 180 ms and 10 user response time of 920 ms. The JSF lacks a bit behind the two applications with these numbers being 190 and 1009 ms respectively.

The increase of the server response time is proportional to the increase of the number of concurrent users, which means the server is able to serve those users well.

The average performance measurement results of the Browse operation are very similar to the ones for the Search operation because the database operations of both operations are also similar.

5.2.3Shopping Operation

This operation includes a database transaction with an insert into the Orders table and multiple inserts into the OrderDetails table. The transaction either succeeds or fails as a whole. Figure 4 shows the test results for this operation.

The Model 2 application results in an average server response time of 230 ms for one user and 2088 ms for 10 users. The Struts application scores similar results with 238 ms and 2033 ms for both one user and 10 concurrent users. The JSF application takes an average of 240 ms to server one user and 2227 ms for 10 concurrent users.

Figure 4 shows that in all applications, a linear increase in the number of concurrent users causes an almost exponential increase in the average server response time. This is due to the lock in the database during the database transaction that causes subsequent requests to be queued until the database lock is released.

Performance comparison for the Model 2, Struts, and JSF applications for the Shopping operation is almost the same as the Search and Browse operations. Model 2 and Struts

perform similarly, while the JSF application is worse. However, the difference between the JSF application and the other two is not significant.

6.Related Work

Wu et al [13] compare the performance of database-based Web applications using Java servlets, PHP version 3, and Common Gateway Interface (CGI). After a series of benchmark tests that performs data retrieval from a MySQL database, they find that the solution of Java servlets with persistent database connection has the best performance. PHP3 using persistent database connections performs fairly well when compared to the CGI solution. They also mention the advantages of using Java servlets. According to these authors. Java servlets are an excellent choice to meet the requirement of e-commerce (such as online shopping) applications and are able to handle client requests in a highly interactive mode. However, Wu et al. do not provide analysis of the architectures of the system they are testing. Nor do they study the ease of development and ease of maintenance aspects of those technologies.

Cecchet et al [2] conduct similar research, this time comparing PHP 4, Java servlets, and Enterprise JavaBeans. They measure the performance of these three architectures using two applications: an online bookstore and an auction site. The online bookstore stresses the server back-end, whereas the auction site represents an application with most workload on the server front end. Their study reveals that PHP4 is more efficient than Java servlets, and the EJBs perform even worse than servlets. However, they note that servlets, being part of the Java solution, provides the flexibility of being able to be ported to another system with a different operating system. This research too does not compare design models of the same technology, as we do. Neither does it offer an insight into the underlying code of the technologies.

In a similar study, Cecchet et al [3] evaluate the performance and scalability of EJB applications using two different open source J2EE containers, JBoss [7] and JOnAS [9], as well as the performance of the EJB applications with servletbased solutions. They find that the servlets-only application they build performs the best due to the fewer number of layer communications in the server. They find that JOnAS outperforms JBoss because of the

英文文献翻译

中等分辨率制备分离的 快速色谱技术 W. Clark Still,* Michael K a h n , and Abhijit Mitra Departm(7nt o/ Chemistry, Columbia Uniuersity,1Veu York, Neu; York 10027 ReceiLied January 26, 1978 我们希望找到一种简单的吸附色谱技术用于有机化合物的常规净化。这种技术是适于传统的有机物大规模制备分离,该技术需使用长柱色谱法。尽管这种技术得到的效果非常好,但是其需要消耗大量的时间,并且由于频带拖尾经常出现低复原率。当分离的样本剂量大于1或者2g时,这些问题显得更加突出。近年来,几种制备系统已经进行了改进,能将分离时间减少到1-3h,并允许各成分的分辨率ΔR f≥(使用薄层色谱分析进行分析)。在这些方法中,在我们的实验室中,媒介压力色谱法1和短柱色谱法2是最成功的。最近,我们发现一种可以将分离速度大幅度提升的技术,可用于反应产物的常规提纯,我们将这种技术称为急骤色谱法。虽然这种技术的分辨率只是中等(ΔR f≥),而且构建这个系统花费非常低,并且能在10-15min内分离重量在的样本。4 急骤色谱法是以空气压力驱动的混合介质压力以及短柱色谱法为基础,专门针对快速分离,介质压力以及短柱色谱已经进行了优化。优化实验是在一组标准条件5下进行的,优化实验使用苯甲醇作为样本,放在一个20mm*5in.的硅胶柱60内,使用Tracor 970紫外检测器监测圆柱的输出。分辨率通过持续时间(r)和峰宽(w,w/2)的比率进行测定的(Figure 1),结果如图2-4所示,图2-4分别放映分辨率随着硅胶颗粒大小、洗脱液流速和样本大小的变化。

外文翻译java

外文资料译文及原文 Java Java I/O 系统 对编程语言的设计者来说,创建一套好的输入输出(I/O)系统,是一项难度极高的任务。 这一点可以从解决方案的数量之多上看出端倪。这个问题难就难在它要面对的可能性太多了。不仅是因为有那么多I/O的源和目地(文件,控制台,网络连接等等),而且还有很多方法(顺序的『sequential』,随机的『random-access』,缓存的『buffered』,二进制的『binary』,字符方式的『character』,行的『by lines』,字的『by words』,等等)。 Java类库的设计者们用"创建很多类"的办法来解决这个问题。坦率地说Java I/O系统的类实在是太多了,以至于初看起来会把人吓着(但是,具有讽刺意味的是,这种设计实际上是限制了类的爆炸性增长)。此外,Java在1.0版之后又对其I/O类库作了重大的修改,原先是面向byte的,现在又补充了面向Unicode字符的类库。为了提高性能,完善功能,JDK 1.4又加了一个nio(意思是"new I/O"。这个名字会用上很多年)。这么以来,如果你想对Java的I/O 类库有个全面了解,并且做到运用自如,你就得先学习大量的类。此外,了解 I/O类库的演化的历史也是相当重要的。可能你的第一反应是"别拿什么历史来烦我了,告诉我怎么用就可以了!"但问题是,如果你对这段历史一无所知,很快就会被一些有用或是没用的类给搞糊涂了。

本章会介绍Java标准类库中的各种I/O类,及其使用方法。 File 类 在介绍直接从流里读写数据的类之前,我们先介绍一下处理文件和目录的类。 File类有一个极具欺骗性的名字;或许你会认为这是一个关于文件的类,但它不是。你可以用它来表示某个文件的名字,也可以用它来表示目录里一组文件的名字。如果它表示的是一组文件,那么你还可以用list( )方法来进行查询,让它会返回String数组。由于元素数量是固定的,因此数组会比容器更好一些。如果你想要获取另一个目录的清单,再建一个File对象就是了。实际上,叫它"FilePath"可能会更好一些。下面我们举例说明怎样使用这个类及其相关的FilenameFilter接口。 目录列表器 假设你想看看这个目录。有两个办法。一是不带参数调用list( )。它返回的是File对象所含内容的完整清单。但是,如果你要的是一个"限制性列表(restricted list)"的话——比方说,你想看看所有扩展名为.java的文件——那么你就得使用"目录过滤器"了。这是一个专门负责挑选显示File对象的内容的类。 下面就是源代码。看看,用了java.utils.Arrays.sort( )和11章的AlphabeticComparator之后,我们没费吹灰之力就对结果作了排序(按字母顺序): //: c12:DirList.java // Displays directory listing using regular expressions. // {Args: "D.*\.java"} import java.io.*; import java.util.*; import java.util.regex.*; import com.bruceeckel.util.*; public class DirList { public static void main(String[] args) { File path = new File("."); String[] list; if(args.length == 0) list = path.list(); else list = path.list(new DirFilter(args[0])); Arrays.sort(list, new AlphabeticComparator());

论文外文文献翻译3000字左右

南京航空航天大学金城学院 毕业设计(论文)外文文献翻译 系部经济系 专业国际经济与贸易 学生姓名陈雅琼学号2011051115 指导教师邓晶职称副教授 2015年5月

Economic policy,tourism trade and productive diversification (Excerpt) Iza Lejárraga,Peter Walkenhorst The broad lesson that can be inferred from the analysis is that promoting tourism linkages with the productive capabilities of a host country is a multi-faceted approach influenced by a variety of country conditions.Among these,fixed or semi-fixed factors of production,such as land,labor,or capital,seem to have a relatively minor influence.Within the domain of natural endowments,only agricultural capital emerged as significant.This is a result that corresponds to expectations,given that foods and beverages are the primary source of demand in the tourism economy.Hence,investments in agricultural technology may foment linkages with the tourism market.It is also worth mentioning that for significant backward linkages to emerge with local agriculture,a larger scale of tourism may be important. According to the regression results,a strong tourism–agriculture nexus will not necessarily develop at a small scale of tourism demand. It appears that variables related to the entrepreneurial capital of the host economy are of notable explanatory significance.The human development index(HDI), which is used to measure a country's general level of development,is significantly and positively associated with tourism linkages.One plausible explanation for this is that international tourists,who often originate in high-income countries,may feel more comfortable and thus be inclined to consume more in a host country that has a life-style to which they can relate easily.Moreover,it is important to remember that the HDI also captures the relative achievements of countries in the level of health and education of the population.Therefore,a higher HDI reflects a healthier and more educated workforce,and thus,the quality of local entrepreneurship.Related to this point,it is important to underscore that the level of participation of women in the host economy also has a significantly positive effect on linkages.In sum, enhancing local entrepreneurial capital may expand the linkages between tourism and other sectors of the host country.

计算机网络-外文文献-外文翻译-英文文献-新技术的计算机网络

New technique of the computer network Abstract The 21 century is an ages of the information economy, being the computer network technique of representative techniques this ages, will be at very fast speed develop soon in continuously creatively, and will go deep into the people's work, life and study. Therefore, control this technique and then seem to be more to deliver the importance. Now I mainly introduce the new technique of a few networks in actuality live of application. keywords Internet Network System Digital Certificates Grid Storage 1. Foreword Internet turns 36, still a work in progress Thirty-six years after computer scientists at UCLA linked two bulky computers using a 15-foot gray cable, testing a new way for exchanging data over networks, what would ultimately become the Internet remains a work in progress. University researchers are experimenting with ways to increase its capacity and speed. Programmers are trying to imbue Web pages with intelligence. And work is underway to re-engineer the network to reduce Spam (junk mail) and security troubles. All the while threats loom: Critics warn that commercial, legal and political pressures could hinder the types of innovations that made the Internet what it is today. Stephen Crocker and Vinton Cerf were among the graduate students who joined UCLA professor Len Klein rock in an engineering lab on Sept. 2, 1969, as bits of meaningless test data flowed silently between the two computers. By January, three other "nodes" joined the fledgling network.

JAVA外文文献+翻译

Java and the Internet If Java is, in fact, yet another computer programming language, you may question why it is so important and why it is being promoted as a revolutionary step in computer programming. The answer isn’t immediately obvious if you’re coming from a traditional programming perspective. Although Java is very useful for solving traditional stand-alone programming problems, it is also important because it will solve programming problems on the World Wide Web. 1.Client-side programming The Web’s in itial server-browser design provided for interactive content, but the interactivity was completely provided by the server. The server produced static pages for the client browser, which would simply interpret and display them. Basic HTML contains simple mechanisms for data gathering: text-entry boxes, check boxes, radio boxes, lists and drop-down lists, as well as a button that can only be programmed to reset the data on the form or “submit” the data on the form back to the server. This submission passes through the Common Gateway Interface (CGI) provided on all Web servers. The text within the submission tells CGI what to do with it. The most common action is to run a program located on the server in a directory that’s typically called “cgi-bin.” (If you watch the address window at the top of your browser when you push a button on a Web page, you can sometimes see “cgi-bin” within all the gobbledygook there.) These programs can be written in most languages. Perl is a common choice because it is designed for text manipulation and is interpreted, so it can be installed on any server regardless of processor or operating system. Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly anything with it. However, Web sites built on CGI programs can rapidly become overly complicated to maintain, and there is also the problem of response time. The response of a CGI program depends on how much data must

五分钟搞定5000字-外文文献翻译【你想要的工具都在这里】-2

五分钟搞定5000字-外文文献翻译 工具大全 建议收藏 在科研过程中阅读翻译外文文献是一个非常重要的环节,许多领域高水平的文献都是外文文献,借鉴一些外文文献翻译的经验是非常必要的。由于特殊原因我翻译外文文献的机会比较多,慢慢地就发现了外文文献翻译过程中的三大利器:G oogle“翻译”频道、金山词霸(完整版本)和CNKI“翻译助手"。 具体操作过程如下: 1.先打开金山词霸自动取词功能,然后阅读文献; 2.遇到无法理解的长句时,可以交给Google处理,处理后的结果猛一看,不堪入目,可是经过大脑的再处理后句子的意思基本就明了了; 3.如果通过Google仍然无法理解,感觉就是不同,那肯定是对其中某个“常用单词”理解有误,因为某些单词看似很简单,但是在文献中有特殊的意思,这时就可以通过CNKI的“翻译助手”来查询相关单词的意思,由于CNKI的单词意思都是来源与大量的文献,所以它的吻合率很高。 另外,在翻译过程中最好以“段落”或者“长句”作为翻译的基本单位,这样才不会造成“只见树木,不见森林”的误导。 注: 1、Google翻译: google,众所周知,谷歌里面的英文文献和资料还算是比较详实的。我利用它是这样的。一方面可以用它查询英文论文,当然这方面的帖子很多,大家可以搜索,在此不赘述。回到我自己说的翻译上来。下面给大家举个例子来说明如何用

吧 比如说“电磁感应透明效应”这个词汇你不知道他怎么翻译, 首先你可以在CNKI里查中文的,根据它们的关键词中英文对照来做,一般比较准确。 在此主要是说在google里怎么知道这个翻译意思。大家应该都有词典吧,按中国人的办法,把一个一个词分着查出来,敲到google里,你的这种翻译一般不太准,当然你需要验证是否准确了,这下看着吧,把你的那支离破碎的翻译在g oogle里搜索,你能看到许多相关的文献或资料,大家都不是笨蛋,看看,也就能找到最精确的翻译了,纯西式的!我就是这么用的。 2、CNKI翻译: CNKI翻译助手,这个网站不需要介绍太多,可能有些人也知道的。主要说说它的有点,你进去看看就能发现:搜索的肯定是专业词汇,而且它翻译结果下面有文章与之对应(因为它是CNKI检索提供的,它的翻译是从文献里抽出来的),很实用的一个网站。估计别的写文章的人不是傻子吧,它们的东西我们可以直接拿来用,当然省事了。网址告诉大家,有兴趣的进去看看,你们就会发现其乐无穷!还是很值得用的。 3、网路版金山词霸(不到1M): 翻译时的速度: 这里我谈的是电子版和打印版的翻译速度,按个人翻译速度看,打印版的快些,因为看电子版本一是费眼睛,二是如果我们用电脑,可能还经常时不时玩点游戏,或者整点别的,导致最终SPPEED变慢,再之电脑上一些词典(金山词霸等)在专业翻译方面也不是特别好,所以翻译效果不佳。在此本人建议大家购买清华

变电站_外文翻译_外文文献_英文文献_变电站的综合概述

英文翻译 A comprehensive overview of substations Along with the economic development and the modern industry developments of quick rising, the design of the power supply system become more and more completely and system. Because the quickly increase electricity of factories, it also increases seriously to the dependable index of the economic condition, power supply in quantity. Therefore they need the higher and more perfect request to the power supply. Whether Design reasonable, not only affect directly the base investment and circulate the expenses with have the metal depletion in colour metal, but also will reflect the dependable in power supply and the safe in many facts. In a word, it is close with the economic performance and the safety of the people. The substation is an importance part of the electric power system, it is consisted of the electric appliances equipments and the Transmission and the Distribution. It obtains the electric power from the electric power system, through its function of transformation and assign, transport and safety. Then transport the power to every place with safe, dependable, and economical. As an important part of power’s transport and control, the transformer substation must change the mode of the traditional design and control, then can adapt to the modern electric power system, the development of modern industry and the of trend of the society life. Electric power industry is one of the foundations of national industry and national economic development to industry, it is a coal, oil, natural gas, hydropower, nuclear power, wind power and other energy conversion into electrical energy of the secondary energy industry, it for the other departments of the national economy fast and stable development of the provision of adequate power, and its level of development is a reflection of the country's economic development an important indicator of the level. As the power in the industry and the importance of the national economy, electricity transmission and distribution of electric energy used in these areas is an indispensable component.。Therefore, power transmission and distribution is critical. Substation is to enable superior power plant power plants or power after adjustments to the lower load of books is an important part of power transmission. Operation of its functions, the capacity of a direct impact on the size of the lower load power, thereby affecting the industrial production and power consumption.Substation system if a link failure, the system will protect the part of action. May result in power outages and so on, to the production and living a great disadvantage. Therefore, the substation in the electric power system for the protection of electricity reliability,

JAVA外文文献翻译基于Java技术的Web应用设计模型的比较研究

中文翻译 基于Java技术的Web应用设计模型的比较研究 来源:School of Computer Science and Engineering University of New South Wales Sydney, NSW 2052, Australia 作者:Budi Kurniawan and Jingling Xue 摘要 Servlet技术是在建立可扩展性Web应用中被应用最广泛的技术。在运用JAVA技术开发Web应用中有四种模型,分别是:Model 1、Model 2、Struts和JavaServer Faces JSF。Model 1使用一连串的JSP页面,Model 2采用了模型,视图,控制器MVC模式。Struts是一个采用了Model 2设计模型的框架,JSF是一种支持ready-to-use组件来进行快速Web应用开发的新技术。Model 1对于中等和大型的应用来说很难维护,所以不推荐使用。本文通过利用Model 2、Struts和JSF这三种模型分别构建三个不同版本的在线商店应用程序来比较和评价这三种模型在应用程序开发和性能上的差异。 1.绪论 当今Web应用是一种展现动态内容的最普遍的方式。构建Web应用有许多种方法,其中最流行的是Servlet技术。这种技术的流行是因为它比CGI、PHP等其他技术更具优越性。然而Servlet对于开发来说还是麻烦的,因为它在传送HTML 标签时需要程序员将他们组合成为一个字符串对象,再将这个对象传给浏览器。同样的,对于输出的一个很小的改动也要求Servlet被重新编译。基于这个原因SUN 公司发明了JavaServer Pages JSP技术。JSP允许HTML标签和Java代码混合在

外文文献翻译助手

五分钟搞定5000字-外文文献翻译 在科研过程中阅读翻译外文文献是一个非常重要的环节,许多领域高水平的文献都是外文文献,借鉴一些外文文献翻译的经验是非常必要的。由于特殊原因我翻译外文文献的机会比较多,慢慢地就发现了外文文献翻译过程中的三大利器:Google“翻译”频道、金山词霸(完整版本)和CNKI“翻译助手"。 具体操作过程如下: 1.先打开金山词霸自动取词功能,然后阅读文献; 2.遇到无法理解的长句时,可以交给Google处理,处理后的结果猛一看,不堪入目,可是经过大脑的再处理后句子的意思基本就明了了; 3.如果通过Google仍然无法理解,感觉就是不同,那肯定是对其中某个“常用单词”理解有误,因为某些单词看似很简单,但是在文献中有特殊的意思,这时就可以通过CNKI的“翻译助手”来查询相关单词的意思,由于CNKI的单词意思都是来源与大量的文献,所以它的吻合率很高。 另外,在翻译过程中最好以“段落”或者“长句”作为翻译的基本单位,这样才不会造成“只见树木,不见森林”的误导。 注: 1、Google翻译:https://www.360docs.net/doc/9b14482476.html,/language_tools google,众所周知,谷歌里面的英文文献和资料还算是比较详实的。我利用它是这样的。一方面可以用它查询英文论文,当然这方面的帖子很多,大家可以搜索,在此不赘述。回到我自己说的翻译上来。下面给大家举个例子来说明如何用吧 比如说“电磁感应透明效应”这个词汇你不知道他怎么翻译, 首先你可以在CNKI里查中文的,根据它们的关键词中英文对照来做,一般比较准确。

在此主要是说在google里怎么知道这个翻译意思。大家应该都有词典吧,按中国人的办法,把一个一个词分着查出来,敲到google里,你的这种翻译一般不太准,当然你需要验证是否准确了,这下看着吧,把你的那支离破碎的翻译在google里搜索,你能看到许多相关的文献或资料,大家都不是笨蛋,看看,也就能找到最精确的翻译了,纯西式的!我就是这么用的。 2、CNKI翻译:https://www.360docs.net/doc/9b14482476.html, CNKI翻译助手,这个网站不需要介绍太多,可能有些人也知道的。主要说说它的有点,你进去看看就能发现:搜索的肯定是专业词汇,而且它翻译结果下面有文章与之对应(因为它是CNKI检索提供的,它的翻译是从文献里抽出来的),很实用的一个网站。估计别的写文章的人不是傻子吧,它们的东西我们可以直接拿来用,当然省事了。网址告诉大家,有兴趣的进去看看,你们就会发现其乐无穷!还是很值得用的。https://www.360docs.net/doc/9b14482476.html, 3、网路版金山词霸(不到1M):https://www.360docs.net/doc/9b14482476.html,/6946901637944806 翻译时的速度: 这里我谈的是电子版和打印版的翻译速度,按个人翻译速度看,打印版的快些,因为看电子版本一是费眼睛,二是如果我们用电脑,可能还经常时不时玩点游戏,或者整点别的,导致最终SPPEED变慢,再之电脑上一些词典(金山词霸等)在专业翻译方面也不是特别好,所以翻译效果不佳。在此本人建议大家购买清华大学编写的好像是国防工业出版社的那本《英汉科学技术词典》,基本上挺好用。再加上网站如:google CNKI翻译助手,这样我们的翻译速度会提高不少。 具体翻译时的一些技巧(主要是写论文和看论文方面) 大家大概都应预先清楚明白自己专业方向的国内牛人,在这里我强烈建议大家仔

博物馆 外文翻译 外文文献 英文文献

第一篇: 航空博物馆与航空展示公园 巴特罗米耶杰·基谢列夫斯基 飞翔的概念、场所的精神、老机场的建筑---克拉科夫新航空博物馆理性地吸取了这些元素,并将它们整合到一座建筑当中。Rakowice-Czyzyny机场之前的旧飞机修理库为新建筑的平面和高度设定了模数比例。在此基本形态上进一步发展,如同裁切和折叠一架纸飞机,生成了一座巨大的建筑。其三角形机翼是由混凝土制成,却如同风动螺旋桨一样轻盈。这个机翼宽大通透,向各个方向开敞。它们的形态与组织都是依据内部功能来设计的。机翼部分为3个不平衡的平面,使内外景观在不断变化中形成空间的延续性,并且联系了建筑内的视觉焦点和室外的展览区。 新航空展示公园的设计连接了博物馆的8栋建筑和户外展览区,并与历史体验建立联系。从前的视觉轴线与通道得到尊重,旧的道路得到了完善,朝向飞机场和跑道的空间被限定出来。每栋建筑展示了一个主题或是一段飞行史。建筑周围伸展出巨大的平台,为特殊主题的室外展览提供了空间。博物馆容纳了超过150架飞机、引擎、飞行复制品、成套的技术档案和历史图片。这里的特色收藏是飞机起源开始的各种飞行器,如Jatho1903、Grade1909、莱特兄弟1909年的飞机模型和1911年的鸽式单翼机。 The first passage: Museum for aviation and aviation exhibition park Bartiomiej Kislelewski The idea of flying, the spirit of place, the structure of the historic airfield – the new Museum of Aviation in Krakow takes up these references intellectually and synthesizes them into a building. The old hangars of the former airport Rakowice Czyzyny set the modular scale for the footprint and the height of the new building. Developed from this basic shape, as if cut out and folded like a paper airplane, a large structure has been generated, with triangular wings made of concrete and yet as light as a wind-vane propeller. The wings are generously glazed and open in all directions. Their form and arrangement depend on the interior uses. In the floor plans of the wings, the three offset

JAVA思想外文翻译毕业设计

文献来源:Bruce Eckel.Thinking in Java [J]. Pearson Higher Isia Education,2006-2-20. Java编程思想 (Java和因特网) 既然Java不过另一种类型的程序设计语言,大家可能会奇怪它为什么值得如此重视,为什么还有这么多的人认为它是计算机程序设计的一个里程碑呢?如果您来自一个传统的程序设计背景,那么答案在刚开始的时候并不是很明显。Java除了可解决传统的程序设计问题以外,还能解决World Wide Web(万维网) 上的编程问题。 1、客户端编程 Web最初采用的“服务器-浏览器”方案可提供交互式内容,但这种交互能力完全由服务器提供,为服务器和因特网带来了不小的负担。服务器一般为客户浏览器产生静态网页,由后者简单地解释并显示出来。基本HTML语言提供了简单的数据收集机制:文字输入框、复选框、单选钮、列表以及下拉列表等,另外还有一个按钮,只能由程序规定重新设置表单中的数据,以便回传给服务器。用户提交的信息通过所有Web服务器均能支持的“通用网关接口”(CGI)回传到服务器。包含在提交数据中的文字指示CGI该如何操作。最常见的行动是运行位于服务器的一个程序。那个程序一般保存在一个名为“cgi-bin”的目录中(按下Web页内的一个按钮时,请注意一下浏览器顶部的地址窗,经常都能发现“cgi-bin”的字样)。大多数语言都可用来编制这些程序,但其中最常见的是Perl。这是由于Perl是专为文字的处理及解释而设计的,所以能在任何服务器上安装和使用,无论采用的处理器或操作系统是什么。 2、脚本编制语言 插件造成了脚本编制语言的爆炸性增长。通过这种脚本语言,可将用于自己客户端程序的源码直接插入HTML页,而对那种语言进行解释的插件会在HTML 页显示的时候自动激活。脚本语言一般都倾向于尽量简化,易于理解。而且由于它们是从属于HTML页的一些简单正文,所以只需向服务器发出对那个页的一

外文文献翻译解读

建筑和建筑材料28(2012)72 - 78 内容列表可以在SciVerse ScienceDirect里找到 期刊主页:https://www.360docs.net/doc/9b14482476.html,/locate/conbuildmat 混凝土中的环氧/锌双涂层在海洋环境中的腐蚀行为 ShiGang董a,b,Bing赵一,ChangJian林a、c、RongGang a、胡格雷戈里Xiaoge张d a国家重点实验室的固体表面物理化学,厦门大学化学与化学工程学院, 中国厦门361005 b能源研究院,厦门大学,厦门361005,中国 c有关海洋腐蚀与防护科技的实验室、洛阳船舶材料研究所、青岛266101,中国 维泰克金属有限公司,产品技术中心,加拿大安大略省米西索加L5K 1 b4 文章信息 文章历史: 来自于2011年4月1日; 来自于2011年8月3日修订后; 来自于2011年8月4; 来自于2011年10月1日的头版;

关键词: 环氧树脂/锌双涂层;钢筋;腐蚀 摘要 钢筋混凝土中的环氧/锌双涂层腐蚀性与黑钢比较,环氧/锌双涂层钢筋混凝土能在海洋环境中保持更长的时间。机械损伤在环氧树脂涂料防腐性能方面的影响已经得以鉴定。环氧涂层和环氧树脂/锌双涂层钢筋,比其他类型的钢筋显示出更好的防腐性能。然而,一旦混凝土中的环氧涂料机械受损,受损区将发生更严重的腐蚀。但环氧/锌双涂层即使收到一些机械损失,在混凝土中也仍然会保持良好的防腐性能。 版权归2011爱思唯尔有限公司所有 1、说明 钢筋混凝土广泛应用于海洋环境中的各种基础设施。基于水泥的水化反应,将氢氧化钙填充在钢筋混凝土空隙中,因此混凝土空隙中溶液保持很强的碱性。在这种碱性环境中,钢筋表面形成了一个稳定的钝化膜表面,它对钢筋起到了良好的抗蚀作用。然而,由于混凝土的碳化和/或导入氯化物,钢筋的钝化膜变得不稳定并开始腐蚀。混凝土中的pH值和Cl浓度有一定的临界值,超过这个临界值,混凝土受腐蚀的机率就会很高。混凝土中钢筋的腐蚀,不仅能拆除钢筋与混凝土之间的结合力,而且会导致混凝土由于腐蚀产物体积的膨胀而产生裂缝。裂缝将进一步加快混凝土的腐蚀,腐蚀严重了就有可能破坏混凝土的结构[3]。 多种基本的因素已减轻钢筋在混凝土中的腐蚀,包括高质量的混凝土,低比率的水,水泥,厚度很薄的混凝土保护层,关键的施工监管等。此外,其他的附加措施也可以减少腐蚀的可能性,例如,混凝土表面的涂层,防腐剂,电化学去氯,阴极保护,高耐蚀钢材料和各种

机器人外文翻译(文献翻译-中英文翻译)

外文翻译 外文资料: Robots First, I explain the background robots, robot technology development. It should be said it is a common scientific and technological development of a comprehensive results, for the socio-economic development of a significant impact on a science and technology. It attributed the development of all countries in the Second World War to strengthen the economic input on strengthening the country's economic development. But they also demand the development of the productive forces the inevitable result of human development itself is the inevitable result then with the development of humanity, people constantly discuss the natural process, in understanding and reconstructing the natural process, people need to be able to liberate a slave. So this is the slave people to be able to replace the complex and engaged in heavy manual labor, People do not realize right up to the world's understanding and transformation of this technology as well as people in the development process of an objective need. Robots are three stages of development, in other words, we are accustomed to regarding robots are divided into three categories. is a first-generation robots, also known as teach-type robot, it is through a computer, to control over one of a mechanical degrees of freedom Through teaching and information stored procedures, working hours to read out information, and then issued a directive so the robot can repeat according to the people at that time said the results show this kind of movement again, For example, the car spot welding robots, only to put this spot welding process, after teaching, and it is always a repeat of a work It has the external environment is no perception that the force manipulation of the size of the work piece there does not exist, welding 0S It does not know, then this fact from the first generation robot, it will exist this shortcoming, it in the 20th century, the late 1970s, people started to study the second-generation robot, called Robot with the feeling that This feeling with the robot is similar in function of a certain feeling, for

相关文档
最新文档