JSP的技术发展历史外文翻译资料

 2022-12-07 02:12

THE TECHNIQUE DEVELOPMENT HISTORY OF JSP

By:Kathy Sierra and Bert Bates

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 JavaScript( SSJS) and the Active Server Pages(ASP) of the Microsoft.JSP compares the SSJS and ASP tohave 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 tobe draw up by the Sun company of, any factory can carry out the JSP on own system.

The After Sun release the JS P( the Java Server Pages) formally, the this kind of new Web application development technique very quickly caused the peoples 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.

The technique of JSP of the company of Sun, making the page of Web develop the personnel can use the HTML perhaps marking of XML to design to turn the end page with format. Use the perhaps small script future life ofmarking of JSP becomes the dynamicstate on the page contents.( the contents changes according to the claim of)

The Java Servlet is a technical foundation of JSP, and the large Web applies the development of the procedure to need the Java Servlet to matchwith with the JSP and then can complete, this name of Servlet comes from the Applet, the local translation method of now is a lot of, this book in order not to misconstruction, decide the direct adoption Servlet but dont doany translation, if reader would like to, can call it as' small service procedure'. The Servlet is similar to traditional CGI, ISAPI, NSAPI etc. Web procedure development the function of the tool in fact, at use the Java Servlet hereafter, the customer need not use again the lowly method of CGI of efficiency, also need not use only the ability come to born page of Web of dynamic state in the method of API that a certain fixedWeb server terrace circulate. Many servers of Web all support the Servlet, even not support theServlet server of Web directly and can also pass the additional applied serverand themold pieces to support the Servlet. Receive benefit in the characteristic of the Java cross-platform, the Servlet is also a terrace irrelevant, actually, as long as match the norm of Java Servlet, the Servlet is complete to have nothing to do with terrace and is to have nothing to do with server of Web. Because the Java Servlet is internal to provide the service by the line distance, need not start a progress to the each claimses, and make use of the multi-threading mechanism can at the same time for severalclaim service, therefore the efficiency of Java Servlet is very high.But the Java Servlet also is not to has no weakness,similar to traditional CGI, ISAPI, theNSAPI method, the Java Servlet is to make use of to output the HTML language sentence to carry out the dynamic state web page of, if

develop the whole website with the Java Servlet, the integration process of the dynamic state part and the static state page is an evil-foreboding dream simply. For solving this kind of weakness of the Java Servlet, the SUN released the JSP.

A number of years ago, Marty was invited to attend a small 20-person industry roundtable discussion on software technology. Sitting in the seat next to Marty was James Gosling, inventor of the Java programming language. Sitting several seats away was a high-levelmanager from a very large software company in Redmond, Washington. During the discussion, the moderator brought up the subject of Jini, which at that time was a new Java technology. The moderator asked the manager what he thought of it, and the manager responded that it was too early to tell, but that it seemedto be an excellent idea. He went on tosay that they would keep an eye onit, and if it seemed to be catching on, they would follow his companys usual 'embrace and extend' strategy. At this point, Gosling lightheartedly interjected 'You mean disgrace and distend.'Now, the grievance that Gosling was airingwas that he felt that this company would take technology from other companies and suborn it for their own purposes. But guess what? The shoe is on the other foot here. The Java community did not invent the idea of designing pages as a mixture of static HTML anddynamic code marked with special tags. For example, Cold Fusion did it years earlier. Even ASP (a product from the very software company of the aforementioned manager) popularized this approach before JSP came along and decided to jump on the bandwagon. In fact, JSP not only adopted the general idea, it even used many of the same special tags asASP did.

The JSP is an establishment at the model of Java servlets on of the expression layer technique, it makes the plait write the HTML to become more simple.Be like the SSJS, it also allows you carry the static state HTML contents and servers the script mix to put together the born dynamic state exportation. JSP the script language that the Java is the tacit approval, however, be like the ASP and can use other languages( such as JavaScript andVBScript), the norm of JSP also allows to use other languages.

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 ASP are all in several year ago to release, the network of that time isstill 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 k

剩余内容已隐藏,支付完成后下载完整资料


JSP的技术发展历史

作者: Kathy Sierra and Bert Bates

Java Server Pages(JSP)是一种基于web的脚本编程技术,类似于网景公司的服务器端Java脚本语言—— server-side JavaScript(SSJS)和微软的Active Server Pages(ASP)。与SSJS和ASP相比,JSP具有更好的可扩展性,并且它不专属于任何一家厂商或某一特定的Web服务器。尽管JSP规范是由Sun公司制定的,但任何厂商都可以在自己的系统上实现JSP。

在Sun正式发布JSP(Java Server Pages)之后,这种新的Web应用开发技术很快引起了人们的关注。JSP为创建高度动态的Web应用提供了一个独特的开发环境。按照Sun的说法,JSP能够适应市场上包括Apache WebServer、IIS4.0在内的85%的服务器产品。

Sun公司的JSP技术,使Web页面开发人员可以使用HTML或者XML标识来设计和格式化最终页面。使用JSP标识或者小脚本来生成页面上的动态内容(内容是根据请求来变化的)。

Java Servlet是JSP技术的基础,而且大型的Web应用程序的开发需要Java Servlet和JSP配合才能完成,Servlet这个名称源于Applet,现在国内的翻译方式很多,本书为了避免误会,决定直接采用Servlet而不做任何翻译,读者如果愿意,可以称之为“小服务程序”。Servlet其实和传统的CGI、ISAPI、NSAPI等Web程序开发工具的作用是相似的,在使用Java Servlet以后,用户不必再使用效率低下的CGI方式,也不必使用只能在某个固定Web服务器平台运行的API方式来动态生成Web页面。许多Web服务器都支持Servlet,即使不直接支持Servlet的Web服务器也可以通过附加的应用服务器和模块来支持Servlet。得益于Java的跨平台的特性,Servlet也是平台无关的,实际上,只要符合Java Servlet规范,Servlet是完全与平台无关且是与Web服务器无关的。由于Java Servlet内部是以线程方式提供服务,不必对于每个请求都启动一个进程,并且利用多线程机制可以同时为多个请求服务,因此Java Servlet效率非常高。但Java Servlet也不是没有缺点,和传统的CGI、ISAPI、NSAPI方式相同,Java Servlet是利用输出HTML语句来实现动态网页的,如果用Java Servlet来开发整个网站,动态部分和静态页面的整合过程会非常难以实现。为了解决Java Servlet的这种缺点,SUN推出了JSP。

许多年前,Marty受到邀请,参加一个有关软件技术的小型研讨会.坐在Marty旁边的人是James Gosling--- Java编程语言的发明者。隔几个位置,是来自华盛顿一家大型软件公司的高级经理。在讨论过程中,研讨会的主席提出了Jini的议题,这在当时是一项新的Java技术。主席向该经理询问他的想法.他回答说,虽然现在言之过早,但这看起来会是非常有前途的一项技术。他们会持续关注这项技术,如果这项技术变得流行起来,他们会遵循公司的“接受并扩充(embrace and extend)”的策略.此时, Gosling随意地插话说“你的意思其实就是不接受且不扩充(disgrace and distend)。” 在此, Gosling的抱怨显示出,他感到这个公司会从其他公司那里拿走技术,用于他们自己的目的.出人意料的是,形势已经完全不同。Java团队并没有发明这一思想----将页面设计成由静态HTML和用特殊标签标记的动态代码混合组成.。ColdFusion多年前就已经这样做了。甚至ASP(来自于前述经理所在公司的一项产品)都在JSP出现之前推广了这种方式。实际上,JSP不只采用了这种通用概念,它甚至使用许多和ASP相同的特殊标签。

JSP是建立在Java servlets模型之上的表达层技术,它使编写HTML变得更简单。像SSJS一样,它也允许你将静态HTML内容与服务器端脚本混合起来生成动态输出。JSP把Java作为默认的脚本语言,然而,就像ASP可以使用其他语言(如JavaScript和VBScript)一样,JSP规范也允许使用其他语言。

要理解JSP怎样联合以上各种所提到的技术的优点,从而轻而易举地实现各种效果,用户必须首先了解“组件为中心的网页开发”和“页面为中心的网页开发”的区别。

SSJS和ASP都是在几年前推出的,那时网络还很年轻,没有人知道除了把所有的商务、数据和表达逻辑统统堆进原始网页中之外还有什么更好的解决方法。这种以页面为中心的模型容易学习并且得到相当快速的发展。然而,随着时间的推移,人们认识到这种方法不适于构建大型的、可升级的Web应用程序。在脚本环境中书写的表达逻辑被锁在页面内,只有通过剪切和粘贴才能被重用。表达逻辑通常和商务及数据逻辑混在一起,这使得当程序员试图改变一个应用程序的外观而不想破坏与之紧密结合的商务逻辑时,应用程序的维护就变得十分艰难。其事实上,企业中可重用组件的应用早已经很成熟,没有人愿意为它们的应用程序重写那些逻辑。HTML和图形设计师把它们的设计的实施工作交给了Web编写者,使他们不得不加倍工作—— 常常是手工编写,因为没有合适的工具可以把服务器端脚本与HTML内容结合起来。简而言之,随着Web应用程序的复杂性不断提升,以页面为中心的开发方式的局限性变得明显起来。

与此同时,人们一直在寻找建立Web应用程序的更好方法,组件在客户机/服务器领域流行起来。JavaBeans和ActiveX被“快速应用程序开发”(RAD)工具发行商推广给Java和Windows应用程序开发者用来快速开发复杂的程序。这些技术使某领域内的专家可以为本领域内的垂直应用编写组件,而开发者可以直接拿来使用而不必掌握这一领域的专门技术。作为一种以组件为中心的开发平台,

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应用程序。

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[28688],资料为PDF文档或Word文档,PDF文档可免费转换为Word

您需要先支付 30元 才能查看全部内容!立即支付

课题毕业论文、开题报告、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找。