外文翻译--JavaServer-Pages(JSP)和微软Active-Server-Pages技术比较.doc

上传人:知****量 文档编号:86252432 上传时间:2023-04-14 格式:DOC 页数:9 大小:63KB
返回 下载 相关 举报
外文翻译--JavaServer-Pages(JSP)和微软Active-Server-Pages技术比较.doc_第1页
第1页 / 共9页
外文翻译--JavaServer-Pages(JSP)和微软Active-Server-Pages技术比较.doc_第2页
第2页 / 共9页
点击查看更多>>
资源描述

《外文翻译--JavaServer-Pages(JSP)和微软Active-Server-Pages技术比较.doc》由会员分享,可在线阅读,更多相关《外文翻译--JavaServer-Pages(JSP)和微软Active-Server-Pages技术比较.doc(9页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、外文文献JavaServer Pagestm Technology - Comparison with ASPWhile JavaServer Pages technology and Microsoft Active Server Pages are similar in many ways, there are also a number of differences that exist. And these differences are just as significant as the similarities, and have far-reaching implication

2、s for the developers who use them as well as the organizations that adopt them as part of their overall Web-based architecture.JSP Technology: An Open Approach In many ways, the biggest difference between JSP and ASP technologies lies in the approach to the software design itself. JSP technology is

3、designed to be both platform and server independent, created with input from a broader community of tool, server, and database vendors. In contrast, ASP is a Microsoft technology that relies primarily on Microsoft technologies. Platform and Server Independence JSP technology adheres to the Write Onc

4、e, Run AnywhereTM philosophy of the JavaTM architecture. Instead of being tied to a single platform or vendor, JSP technology can run on any Web server and is supported by a wide variety of tools from multiple vendors. Because it uses ActiveX controls for its components, ASP technology is basically

5、restricted to Microsoft Windows-based platforms. Offered primarily as a feature of Microsoft IIS, ASP technology does not work easily on a broader range of Web servers because ActiveX objects are platform specific. Although ASP technology is available on other platforms through third-party porting p

6、roducts, to access components and interact with other services, the ActiveX objects must be present on the selected platform. If not present, a bridge to a platform supporting them is required. Open Development Process, Open Source Sun developed JSP technology using the Java Community Process. Since

7、 1995, Sun has used this open process to develop and revise Java technology and specifications in cooperation with the international Java community. Working with Sun in the JSP effort are authoring tool vendors (such as Macromedia), container companies (such as Apache and Netscape), end users, consu

8、ltants, and others. Going forward, Sun is licensing the latest versions of JSP and JavaTM Servlet (JSP 1.1 and Java Servlet 2.2) source code to Apache to be developed and released under the Apache development process. Apache, Sun, and a number of other companies and individuals will openly develop a

9、 robust reference implementation (RI) that is freely available to any company or individual. Additional information can be found at http:/jakarta.apache.org/. The JSP application programming interface (API) has undoubtedly benefited - and will continue to benefit - from the input of this extended co

10、mmunity. In contrast, ASP technology is a specifically Microsoft initiative, developed in a proprietary process. ASP Technology JSP Technology Web Server Microsoft IIS or Personal Web Server Any Web server, including Apache, Netscape, and IIS Platforms Microsoft Windows1 Most popular platforms, incl

11、uding the Solaris Operating Environment, Microsoft Windows, Mac OS, Linux, and other UNIX platform implementations.Accessing other platforms requires third-party ASP porting products. For a company selecting the components of a growing, Web-based information architecture, JSP technology provides a f

12、lexible, open choice that works with a wide variety of vendors tools and reflects industry input and collaboration. The Developers Perspective Both ASP and JSP technologies let developers separate content generation from layout by accessing components from the page. ASP supports the COM model, while

13、 JSP technology provides components based on JavaBeansTM technology or JSP tags. As noted previously, the differences outweigh the similarities. Extensible JSP Tags The first difference apparent to any page author are the JSP tags themselves. While both ASP and JSP use a combination of tags and scri

14、pting to create dynamic Web pages, JSP technology enables developers to extend the JSP tags available. JSP developers can create custom tag libraries, so page authors can access more functionality using XML-like tags and depend less on scripting. With custom tags, developers can shield page authors

15、from the complexities of page creation logic and extend key functions to a broader range of authors. Reusability Across Platforms Developers will also notice the focus on reusability. The JSP components (Enterprise JavaBeansTM, JavaBeans, or custom JSP tags) are reusable across platforms. An Enterpr

16、ise JavaBean component accessing legacy databases can serve distributed systems on both UNIX and Microsoft Windows platforms. And the tag extension capability of JSP technology gives developers an easy, XML-like interface for sharing packaged functionality with page designers throughout the enterpri

17、se. This component-based model speeds application development because it enables developers to: Build quick prototype applications using lightweight subcomponents, then integrate additional functionality as it becomes available Leverage work done elsewhere in the organization and encapsulate it in a

18、 JavaBean or Enterprise JavaBean component The Java Advantage JSP technology uses the Java language for scripting, while ASP pages use Microsoft VBScript or JScript. The Java language is a mature, powerful, and scalable programming language that provides many benefits over the Basic-based scripting

19、languages. For example, the Java language provides superior performance to the interpreted VBScript or JScript languages. Because they use Java technology and are compiled into Java servlets, JSP pages provide a gateway to the entire suite of server-side Java libraries for HTTP-aware applications. T

20、he Java language makes the developers job easier in other ways as well. For example, it helps protect against system crashes, while ASP applications on Windows NT systems are susceptible to crashing. The Java language also helps in the area of memory management by providing protection against memory

21、 leaks and hard-to-find pointer bugs that can slow application deployment. Plus, JSP provides the robust exception handling necessary for real-world applications.Easier Maintenance Applications using JSP technology are easier to maintain over time than ASP-based applications. Scripting languages are

22、 fine for small applications, but do not scale well to manage large, complex applications. Because the Java language is structured, it is easier to build and maintain large, modular applications with it. JSP technologys emphasis on components over scripting makes it easier to revise content without

23、affecting logic, or revise logic without changing content. The Enterprise JavaBeans architecture encapsulates the enterprise logic, such as database access, security, and transaction integrity, and isolates it from the application itself. Because JSP technology is an open, cross-platform architectur

24、e, Web servers, platforms, and other components can be easily upgraded or switched without affecting JSP-based applications. This makes JSP suitable for real-world Web applications, where constant change and growth is the norm. ASP Technology JSP Technology Reusable, Cross-Platform Components No Jav

25、aBeans, Enterprise JavaBeans, custom JSP tags Security Against System Crashes No Yes Memory Leak Protection No Yes Scripting Language VBScript, JScript Java Customizable Tags No Yes Scalability in the Enterprise The Java 2 Platform, Enterprise Edition (J2EE) is the Java architecture for developing m

26、ultitier enterprise applications. As part of J2EE, JSP pages have access to all J2EE components, including JavaBeans and Enterprise JavaBeans components and Java servlets. JSP pages are actually compiled into servlets, so they have all of the benefits of these flexible, server-side Java applications

27、. The J2EE platform containers manage the complexities of enterprise applications, including transaction management and resource pooling. JSP pages have access to all of the standard J2EE services, including: Java Naming and Directory InterfaceTM APIJDBCTM API (communicating with relational database

28、s) JavaMailTM (classes supporting Java-based mail and messaging applications) JavaTM Message Service (JMS) Through J2EE, JSP pages can interact with enterprise systems in many ways. J2EE supports two CORBA-compliant technologies: Java IDL and RMI-IIOP. With Enterprise JavaBeans technology, JSP pages

29、 can access databases using high-level, object-relational mappings. Finally, because JSP technology was developed through the Java Community Process, it has wide support from tool, Web server and application server vendors. This enables users and partners take a best-of-breed approach, selecting the

30、 best tools for their specific applications while protecting their investment in code and in personnel training. ASP Technology JSP Technology Compatible with Legacy Databases Yes (COM) Yes (using JDBC API) Ability to Integrate with Data Sources Works with any ODBC-compliant database Works with any

31、ODBC- and JDBC technology-compliant database Components COM components JavaBeans, Enterprise JavaBeans, or extensible JSP tags Extensive Tool Support Yes Yes中文译文JavaServer Pages(JSP)和微软Active Server Pages技术比较-第一眼看上去,JavaServer Pages(JSP)和微软的Active Server Pages技术有很多相似之处。它们都是为基于Web的应用中开发动态页面部分而设计的。在一定

32、程度上,它们都是通过使用由页面本身调用的组件技术,使开发人员能够把编程逻辑与页面设计分割开来;而且都提供了CGI脚本的替代品,使页面开发变得更加方便、快捷。尽管JavaServer Pages(JSP)技术和微软的Active Server Pages(ASP)在很多方面有相似之处,但是也存在着许多差异。而且这些差异与相似之处同样显著,对于使用这些技术的开发人员和采用这些技术作为整体Web应用架构组成部分的机构,有着极其深远的影响。JSP技术:一种开放方式的技术 在很多方面中,JSP和ASP技术最大的差异在于软件设计的方式本身。JSP技术被设计为与平台和服务器无关的,它是广大的工具、服务器和数

33、据库厂商共同支持和参与的结晶。相反,ASP是一种微软的技术,主要依赖于微软的平台和各项技术。与平台和服务器的无关性JSP技术坚持了Java架构的“编写一次,在任何地方运行”的理念。JSP技术不是与单一平台或厂商捆绑的,而是可以运行在任何Web服务器上的,而且它得到了众多厂商的很多种工具的支持。 由于ASP技术是使用ActiveX控制其组件的,它基本上被限定在微软的基于Windows的平台上。它主要是被提供作为微软的IIS的一个特性,由于ActiveX对象是平台专用的,所以,ASP技术无法方便的在广大的Web服务器上运行。尽管通过使用第三方提供的移植产品,可以使ASP技术在其它平台上得以使用,但

34、是,要想访问组件并与其它服务实现交互,ActiveX对象必须出现在所选择的平台上,否则,必须有一个连接桥梁(Bridge)使之与某个支持它们的平台进行连接。 开放的开发流程,开放资源 Sun公司是通过Java Community Process来开发JSP技术的。从1995年,Sun公司一直采用这种开放的工作流程与国际Java联盟合作开发和修改Java技术及其规范。在JSP领域与Sun公司共同发起努力的包括很多公司,其中有工具提供商(如Macromedia)、容器开发公司(如Apache和Netscape)、最终用户、咨询顾问、以及其它参与者。更进一步,Sun公司将JSP和Java Servl

35、et的最新版本( JSP1.1 和 Servlet2.2 )的源代码授权给Apache,通过Apache开发工作流程进行开发和发布。Apache、Sun和其它一些公司及个人将开放地开发一个健壮的参考实现(RI),它是对任何公司和个人免费使用的。更详细的信息请参见 http:/jakarta.apache.org/。 JSP的应用开发接口(API)毫无疑问是受益于、而且将继续获益于其广泛的、可扩展的开发联盟。相反,ASP技术是明确地由微软主导着,在一种封闭的工作流程中开发。ASP技术与JSP技术相比较 Web服务器 ASP用Microsoft IIS或Personal Web服务器 JSP用任何

36、Web服务器,包括Apache, Netscape, 和IIS 平台ASP在 Microsoft Windows(访问其它平台需要第三方的ASP移植产品) JSP在大多数流行平台,包括Solaris操作系统,Microsoft windows, Mac OS, Linux,和其它Unix平台。 对于正在选择不断增加的组件和基于Web的信息架构的公司,JSP技术提供了一种灵活的、开放的选择,你将可以选择众多厂商的工具进行工作,它们反应着业界的趋势和合作。 从开发人员的角度看 ASP和JSP技术都能够使开发人员通过从页面访问组件实现内容生成和页面布局的分离。ASP支持COM模式,而JSP技术提供了

37、基于JavaBeans技术的组件和JSP标记。 向前面提到的,二者的差异超过了其相似之处。可扩展的JSP标记展现在任何页面作者面前的第一个差别就是JSP标记本身。尽管ASP和JSP都是通过标记和脚本的组合使用来实现动态Web页面生成,JSP技术允许开发人员扩展可用的JSP标记。JSP开发人员能够创建个性化标记库(Custom Tag Libraries),这样页面作者能够使用类似XML的标记来实现更多的功能,而尽量少地依赖于脚本。使用个性化标记,开发人员能够使页面作者不被复杂的页面生成逻辑困扰,并且可以为更广泛的作者提供关键功能。跨平台的可重用性 开发人员同样关注可重用性。JSP组件(Ente

38、rprise JavaBeans, JavaBeans或个性化JSP标记)是可以跨平台重复使用的。一个访问已有的数据库的Enterprise JavaBean组件能够同时在UNIX和Microsoft Windows平台上支持分布式系统。而且,JSP技术的标记扩展能力为开发人员提供了一种方便的,类似XML的接口,它们可以用于与整个企业内的页面设计人员共享这些封装的功能。这种基于组件的模式加速了应用的开发,因为它能够使开发人员通过使用轻负载(lightweight)的子组件来快速地开发出应用的原型,等其它附加功能开发出来后再将它们集成进来;共享机构内其它部门的工作成果,并将其封装在JavaBea

39、n或Enterprise JavaBean组件中 Java的优势 JSP技术是使用Java语言作为其脚本语言的,而ASP页面中是使用微软的VBScript或者JScript。Java语言是一种成熟的、功能强大的和具有可伸缩性的编程语言,与基于Basic的脚本语言相比它具有很多优势。例如,Java语言与基于解释执行的VBScript或JScript相比有更高的性能。由于JSP页面使用Java技术并且会被编译成Java Servlets,它们为HTTP应用提供了一个连接全部服务器端Java类库的网关。Java语言在其它方面同样使编程人员的工作更简便。例如,它帮助防备系统崩溃,而在Windows N

40、T系统上的ASP应用容易受到系统崩溃的影响。Java语言在内存管理方面同样很有帮助,它提供了 针对影响应用部署的内存泄漏以及很难发现的指针错误的保护。另外,JSP提供了真实应用中非常必要的健壮的意外处理机制。更容易的维护 使用JSP技术的应用远比基于ASP的应用容易管理。 脚本语言适用于小型应用,但是很难很好地扩展到管理大型、复杂的应用上去。由于Java语言是结构化的,所以它更容易创建并管理大型、模块化的应用。 JSP技术重视组件多于脚本,这使它更容易修改内容而不影响逻辑,或者修改逻辑而不改变内容。 Enterprise JavaBeans架构封装了企业应用逻辑,如数据库访问、安全、和事务完整

41、性,并且将它们与应用本身隔离。因为JSP技术是一种开放的,跨平台的架构,Web服务器,平台,和其它组件能够被方便的升级或更换,而不影响JSP应用。这使JSP适用于真实世界的、面临着持续不断的增长和变化的Web应用。 ASP技术JSP技术相比较是否是可重用的、跨平台的组件:ASP不是; JSP通过JavaBeans, EJB, 个性化JSP标记 是否对系统崩溃的防备 :ASP不是,JSP是 是否对内存泄漏的保护 :ASP不是,JSP是脚本语言:ASP使用VBScript,JScript ;JSP使用Java是否是可个性化的标记 ASP不是,JSP是在企业级应用中的可伸缩性方面: Java2平台企

42、业版(Java 2 Platform, Enterprise Edition, J2EE)是用于开发多层架构的企业级应用的Java体系结构。作为J2EE一个组成部分,JSP页面能够访问J2EE的所有组件,包括JavaBeans、EJB和Java Servlets。JSP页面实际上会被编译成Servlets,从而拥有这些灵活的服务器端Java应用的全部优势。J2EE平台的容器管理着企业应用中的错综复杂的事物,包括交易事务管理和资源池。 JSP页面能够访问全部标准的J2EE服务,包括: Java Naming and Directory Interface API JDBC API(用于连接关系型

43、数据库) JavaMail(支持基于Java的邮件和消息应用的类) Java Message Service(JMS)通过J2EE,JSP页面可以采用很多方式与企业系统进行交互。J2EE支持两种与CORBA兼容的技术:Java IDL和RMI-IIOP。通过EJB技术,JSP页面可以使用高级的、对象关系映射(object-relational mappings)的方式来访问数据库。最后,由于JSP技术是通过Java Community Process进行开发的,它拥有广泛的工具、Web服务器和应用服务器厂商的支持。这使最终用户和合作伙伴能够为它们特定的应用,以最佳的方式、选择最好的工具,从而保护他们在编码和人员培训方面的投资。ASP技术JSP技术相比较对传统数据库的兼容能力(COM) JSP是使用JDBC API) 与数据资源集成的能力 可以与任何ODBC兼容的数据库协同工作 可以与任何ODBC和JDBC技术兼容的数据库协同工作 组件上比较ASP是COM组件 JSP则是JavaBeans,EJB或可扩展的JSP标记,是否有广泛的工具支持 ASP和JSP都有。

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 教案示例

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁