logo资料库

计算机专业外文翻译(JSP技术发展史).doc

第1页 / 共8页
第2页 / 共8页
第3页 / 共8页
第4页 / 共8页
第5页 / 共8页
第6页 / 共8页
第7页 / 共8页
第8页 / 共8页
资料共8页,全文预览结束
附录A 英文原文
The Technique Development History Of JSP
附录B 中文翻译
JSP技术发展史
本科生毕业设计(论文) 第 1页 附录 A 英文原文 The Technique Development History Of JSP JavaScript( SSJS) and The Java Server Pages( JSP) is a kind of according to web of the script plait distance technique, similar carries the script language of Java in the server of the Netscape company of server- side of the Microsoft.JSP compares the SSJS and ASP to have better can expand sex, and it is no more exclusive than any factory or some one particular server of Web.Though the norm of JSP is to be draw up by the Sun company of, any factory can carry out the JSP on own system. the Active Server Pages( ASP) The After Sun release the JSP( the Java development technique Server Pages) formally, the this kind of new Web application people's concern.JSP provided a special development environment for the Web application that establishes the high dynamic state.According to the Sun parlance, the JSP can adapt to include the Apache WebServer, IIS4.0 on the market at inside of 85% server product. very quickly caused the This chapter will introduce the related knowledge of JSP and Databases, and JavaBean related contents, is all certainly rougher introduction among them basic contents, say perhaps to is a Guide only, if the reader needs the more detailed information, pleasing the book of consult the homologous JSP. A. Generalize The JSP(Java Server Pages) is from the company of Sun Microsystems initiate, the many companies the participate to the build up the together of the a kind the of dynamic the state web the page technique standard, the it have the it in the construction the of the dynamic state the web page the strong but the do not the especially of the function.JSP and the technique of ASP of the Microsoft is very alike.Both all provide the ability that mixs with a certain procedure code and is explain by the language engine to carry out the procedure code in the code of HTML.Underneath we are simple of carry on the introduction to it. B. JSP characteristics Is a service according to the script language in some one language of the statures script the JSP should be see make is a kind of system this kind of discuss,
本科生毕业设计(论文) 第 2页 language.However, be a kind of script language, the JSP seemed to be too strong again, almost can use all Javas in the JSP. Be a kind of according to text originally of, take manifestation as the central development technique, the JSP provided all advantages of the Java Servlet, and, when combine with a JavaBeans together, providing a kind of make contents and manifestation that simple way that logic separate.Separate the contents and advantage of logical manifestations is, the personnel who renews the page external appearance need not know the code of Java, and renew the JavaBeans personnel also need not be design the web page of expert in hand, can use to take the page of JavaBeans JSP to define the template of Web, to build up a from have the alike external appearance of the website that page constitute.JavaBeans completes the data to provide, having no code of Java in the template thus, this means that these templates can be written the personnel by a HTML plait to support.Certainly, can also make use of the Java Servlet to control the logic of the website, adjust through the Java Servlet to use the way of the document of JSP to separate website of logic and contentses. Generally speaking, in actual engine of JSP, the page of JSP is the edit and translate type while carry out, not explain the type of.Explain the dynamic state web page development tool of the type,such as ASP, PHP3 etc., because speed etc. reason, have already can't satisfy current the large electronic commerce needs appliedly, traditional development techniques are all at to edit and translate the executive way change, such as the ASP → ASP+;PHP3 → PHP4. In the JSP norm book, did not request the procedure in the JSP code part( be called the Scriptlet) and must write with the Java definitely.Actually, have some engines of JSP are adoptive other script languageses, such as the EMAC- Script, WebL etc., but actually this a few script languages also are to set up on the Java, edit and translate for the Servlet to carry out of.Write according to the norm of JSP, have no Scriptlet of relation with Java also is can of, however, mainly lie in the ability and JavaBeans, the Enterprise JavaBeanses because of the JSP strong function to work together, so even is the Scriptlet part not to use the Java, edit and translate of performance code also should is related with Java. C. JSP mechanism
本科生毕业设计(论文) 第 3页 To comprehend the JSP how unite the technical advantage that above various speak of, come to carry out various result easily, the customer must understand the differentiation of" the module develops for the web page of the center" and" the page develops for the web page of the center" first. The SSJS and ASPses are all in several year agos to release, the network of that time is still very young, no one knows to still have in addition to making all business, datas and the expression logic enter the original web page entirely heap what better solve the method.This kind of model that take page as the center studies and gets the very fast development easily.However, along with change of time, the people know that this kind of method is unwell in set up large, the Web that can upgrade applies the procedure.The expression logic write in the script environment was lock in the page, only passing to shear to slice and glue to stick then can drive heavy use.Express the logic to usually mix together with business and the data logics, when this makes be the procedure member to try to change an external appearance that applies the procedure but do not want to break with its llied business logic, apply the procedure of maintenance be like to walk the similar difficulty on the eggshell.In fact in the business enterprise, heavy use the application of the module already through very mature, no one would like to rewrite those logics for their applied procedure.HTML and sketch the designer handed over to the implement work of their design the Web plait the one who write, make they have to double work- Usually is the handicraft plait to write, because have no fit tool and can carry the script and the HTML contentses knot to the server to put together.Chien but speech, apply the complexity of the procedure along with the Web to promote continuously, the development method that take page as the center limits sex to become to get up obviously. the module spreads At the same time, the people always at look for the better method of build up the Web application procedure, the realm.JavaBeans and ActiveX were published the company to expand to apply the procedure developer for Java and Windows to use to come to develop the complicated procedure quickly by" the fast application procedure development"( RAD) tool.These in the some realm be able to write the module for the techniques make the expert in customer's machine/ server
本科生毕业设计(论文) 第 4页 perpendicular application plait in the skill area, but the developer can go fetch the usage directly but need not control the expertise of this realm. Be a kind of take module as the central development terrace, the JSP appeared.It with the JavaBeans and Enterprise JavaBeans( EJB) module includes the model of the business and the data logic for foundation, provide a great deal of label and a script terraces to use to come to show in the HTML page from the contents of JavaBeans creation or send a present in return.Because of the property that regards the module as the center of the JSP, it can drive Java and not the developer of Java uses equally.Not the developer of Java can pass the JSP label( Tags) to use the JavaBeans that the deluxe developer of Java establish.The developer of Java not only can establish and use the JavaBeans, but also can use the language of Java to come to control more accurately in the JSP page according to the expression logic of the first floor JavaBeans. See now how JSP is handle claim of HTTP.In basic claim model, a claim directly was send to JSP page in.The code of JSP controls to carry on hour of the logic processing and module of JavaBeanses' hand over with each other, and the manifestation result in dynamic state bornly, mixing with the HTML page of the static state HTML code.The Beans can be JavaBeans or module of EJBs.Moreover, the more complicated claim model can see make from is request other JSP pages of the page call sign or Java Servlets. The engine of JSP wants to chase the code of Java that the label of JSP, code of Java in the JSP page even all converts into the big piece together with the static state HTML contentses actually.These codes piece was organized the Java Servlet that customer can not see to go to by the engine of JSP, then the Servlet edits and translate them automatically byte code of Java.Thus, the visitant that is the website requests a JSP page, under the condition of it is not knowing, an already born, the Servlet actual full general that prepared to edit and translate completes all works, very concealment but again and efficiently.The Servlet is to edit and translate of, so the code of JSP in the web page does not need when the every time requests that page is explain.The engine of JSP need to be edit and translate after Servlet the code end is modify only once, then this Servlet that editted and translate can be carry out.The in view of the fact JSP engine auto is born to edit and translate the Servlet also, need not procedure
本科生毕业设计(论文) 第 5页 member begins to edit and translate the code, so the JSP can bring vivid sex that function and fast developments need that you are efficiently. Compared with the traditional CGI, the JSP has the equal advantage.First, on the speed, the traditional procedure of CGI needs to use the standard importation of the system to output the equipments to carry out the dynamic state web page born, but the JSP is direct is mutually the connection with server.And say for the CGI, each interview needs to add to add a progress to handle, the progress build up and destroy by burning constantly and will be a not small burden for calculator of be the server of Web.The next in order, the JSP is specialized to develop but design for the Web of, its purpose is for building up according to the Web applied procedure, included the norm and the tool of a the whole set.Use the technique of JSP can combine a lot of JSP pages to become a Web application procedure very expediently.
本科生毕业设计(论文) 第 6页 附录 B 中文翻译 JSP 技术发展史 Java Server Pages(JSP)是一种基于 web 的脚本编程技术,类似于网景公司的服务 器 端 Java 脚 本 语 言 —— server-side JavaScript(SSJS) 和 微 软 的 Active Server Pages(ASP)。JSP 比 SSJS 和 ASP 具有更好的可扩展性,并且它不专属于任何一家厂商或 某一特定的 Web 服务器。尽管 JSP 规范是由 Sun 公司制定的,但任何厂商都可以在自己 的系统上实现 JSP。 在 Sun 正式发布 JSP(Java Server Pages)之后,这种新的 Web 应用开发技术很快引 起了人们的关注。JSP 为创建高度动态的 Web 应用提供了一个独特的开发环境。按照 Sun 的说法,JSP 能够适应市场上包括 Apache WebServer、IIS4.0 在内的 85%的服务器产品。 本文将介绍 JSP 相关的知识,以及 JavaBean 的相关内容,当然都是比较粗略的介 绍其中的基本内容,或者说仅仅是一个 Guide,如果读者需要更详细的信息,请参考相 应的 JSP 的书籍。 A. 概述 JSP(Java Server Pages)是由 Sun Microsystems 公司倡导、许多公司参与一起建 立的一种动态网页技术标准,其在动态网页的建设中有其强大而特别的功能。JSP 与 Microsoft 的 ASP 技术非常相似。两者都提供在 HTML 代码中混合某种程序代码、由语言 引擎解释执行程序代码的能力。下面我们简单的对它进行介绍。 B. JSP 的特点 按照脚本语言是服务于某一个子系统的语言这种论述,JSP 应当被看作是一种脚 本语言。然而,作为一种脚本语言,JSP 又显得过于强大了,在 JSP 中几乎可以使用 全部的 Java 类。 作为一种基于文本的、以显示为中心的开发技术,JSP 提供了 Java Servlet 的所有 好处,并且,当与一个 JavaBeans 类结合在一起时,提供了一种使内容和显示逻辑分开 的简单方式。分开内容和显示逻辑的好处是,更新页面外观的人员不必懂得 Java 代码, 而更新 JavaBeans 类的人员也不必是设计网页的行家里手,就可以用带 JavaBeans 类的 JSP 页面来定义 Web 模板,以建立一个由具有相似的外观的页面组成的网站。JavaBeans 类完成数据提供,这样在模板中就没有 Java 代码,这意味着这些模板可以由一个 HTML
本科生毕业设计(论文) 第 7页 编写人员来维护。当然,也可以利用 Java Servlet 来控制网站的逻辑,通过 Java Servlet 调用 JSP 文件的方式来将网站的逻辑和内容分离。 一般来说,在实际的 JSP 引擎中,JSP 页面在执行时是编译式,而不是解释式的。 解释式的动态网页开发工具如 ASP、PHP3 等由于速度等原因已经满足不了当前大型电子 商务应用的需要了,传统的开发技术都在向编译执行的方式改变,如 ASP→ASP+;PHP3 →PHP4。 在 JSP 规范书中,并没有明确要求 JSP 中的程序代码部分(称为 Scriptlet)一定要 用 Java 来写。实际上,有一些 JSP 引擎就是采用的其他脚本语言,如 EMAC-Script、WebL 等,但实际上这几种脚本语言也是构建在 Java 上面,编译为 Servlet 来实现的。按照 JSP 规范书写,和 Java 没有任何关系的 Scriptlet 也是可以的,不过,由于 JSP 的强大 功能主要在于能和 JavaBeans、Enterprise JavaBeans 一起工作,所以即使是 Scriptlet 部分不使用 Java,编译成的执行代码也应该是与 Java 相关的。 C. JSP 的机制 要理解 JSP 怎样联合以上各种所提到的技术的优点,来轻而易举地实现各种效果, 用户必须首先了解“组件为中心的网页开发”和“页面为中心的网页开发”的区别。 SSJS 和 ASP 都是在几年前推出的,那时网络还很年轻,没有人知道除了把所有的商 务、数据和表达逻辑统统堆进原始网页中之外还有什么更好的解决方法。这种以页面为 中心的模型容易学习并且得到相当快速的发展。然而,随着时间的推移,人们认识到这 种方法不适于构建大型的、可升级的 Web 应用程序。在脚本环境中书写的表达逻辑被锁 在页面内,只有通过剪切和粘贴才能被重用。表达逻辑通常和商务及数据逻辑混在一起, 这使得当程序员试图改变一个应用程序的外观而不想破坏与之紧密结合的商务逻辑时, 应用程序的维护就像在蛋壳上走路一样困难。其实在企业中,可重用组件的应用早已经 很成熟,没有人愿意为它们的应用程序重写那些逻辑。HTML 和图形设计师把它们的设计 的实施工作交给了 Web 编写者,使他们不得不加倍工作—— 常常是手工编写,因为没有 合适的工具可以把服务器端脚本与 HTML 内容结合起来。简而言之,随着 Web 应用程序 的复杂性不断提升,以页面为中心的开发方式的局限性变得明显起来。 与此同时,人们一直在寻找建立 Web 应用程序的更好方法,组件在客户机/服务器 领域流行起来。JavaBeans 和 ActiveX 被“快速应用程序开发”(RAD)工具发行商推广 给 Java 和 Windows 应用程序开发者用来快速开发复杂的程序。这些技术使某领域内的
本科生毕业设计(论文) 第 8页 专家可以为本领域内的垂直应用编写组件,而开发者可以直接拿来使用而不必掌握这 一领域的专门技术。 作为一种以组件为中心的开发平台,JSP 出现了。它以 JavaBeans 和 Enterprise JavaBeans(EJB)组件包含商务和数据逻辑的模型为基础,提供大量标签和一个脚本平台 用来在 HTML 页中显示由 JavaBeans 产生或回送的内容。由于 JSP 的以组件为中心的性 质,它可以被 Java 和非 Java 开发者同样使用。非 Java 开发者可以通过 JSP 的标签(Tags) 来使用高级 Java 开发者创建的 JavaBeans。Java 开发者不仅可以创建和使用 JavaBeans, 还能在 JSP 页中使用 Java 语言来更精密地控制基于底层 JavaBeans 的表达逻辑。 现在来看看 JSP 是如何处理 HTTP 请求的。在基本请求模型中,一个请求直接被送 到 JSP 页中。JSP 代码控制着进行逻辑处理时与 JavaBeans 组件的交互,并在动态生成 的、混合了静态 HTML 代码的 HTML 页中显示结果。Beans 可以是 JavaBeans 或 EJB 组件。 另外,更加复杂的请求模型可看作从被请求页呼叫其他 JSP 页或 Java Servlets。 JSP 引擎实际上要把 JSP 标签、JSP 页中的 Java 代码甚至连同静态 HTML 内容都转 换为大块的 Java 代码。这些代码块被 JSP 引擎组织到用户看不到的 Java Servlet 中去, 然后 Servlet 自动把它们编译成 Java 字节码。这样,当网站的访问者请求一个 JSP 页 时,在它不知道的情况下,一个已经生成的、预编译过的 Servlet 实际上将完成所有的 工作,非常隐蔽而又高效。因为 Servlet 是编译过的,所以网页中的 JSP 代码不需要在 每次请求该页时被解释一遍。JSP 引擎只需在 Servlet 代码最后被修改后编译一次,然 后这个编译过的 Servlet 就可以被执行了。由于是 JSP 引擎自动生成并编译 Servlet, 不用程序员动手编译代码,所以 JSP 能带给你高效的性能和快速开发所需的灵活性。 和传统的 CGI 相比较,JSP 有相当的优势。首先,在速度上,传统的 CGI 程序需要 使用系统的标准输入输出设备来实现动态网页的生成,而 JSP 是直接和服务器相关联的。 而且对于 CGI 来说,每一个访问就需要新增加一个进程来处理,进程不断地建立和销毁 对于作为 Web 服务器的计算机将是不小的负担。其次,JSP 是专门为 Web 开发而设计的, 其目的是为了建立基于 Web 的应用程序,包含了一整套的规范和工具。使用 JSP 技术可 以很方便地将一大堆 JSP 页面组合成为一个 Web 应用程序。
分享到:
收藏