网页设计毕设外文翻译--基于JSP网页自动生成工具的设计与实现_第1页
网页设计毕设外文翻译--基于JSP网页自动生成工具的设计与实现_第2页
网页设计毕设外文翻译--基于JSP网页自动生成工具的设计与实现_第3页
网页设计毕设外文翻译--基于JSP网页自动生成工具的设计与实现_第4页
网页设计毕设外文翻译--基于JSP网页自动生成工具的设计与实现_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

附件 1 外文资料翻译译文 基于 JSP 网页自动生成工具的设计与实现 Web 开发技术是 Internet 应用的一个重要方面 而 JSP 又是 Web 开发的最 先进的技术 是当前 Web 开发人员的首选技术 但是由于 JSP 对 Web 开发人员 要求较高 所以许多一般的 Web 开发人员还不能够使用这一项先进的技术 讨 论基于模板和标签库的 JSP 网页自动生成工具的设计和实现 提出具体的设计 思想和实现方法 随着 WWW World Wide Web 的普及 动态网页技术也急速发展 从原来 的 CGI Common Gateway In terface 到 ASP Active Server Page 都从 某种程度上满足了网页开发人员对动态网页开发技术的需求 但是不管是 CGI 还是 ASP 都存在一定的局限性 如 CGI 对服务器资源的耗费 ASP 只能同 Microsoft IIS 一起使用等 这些都限制了这些技术的使用范围 极大地阻碍 了它们的推广 广大的页面开发人员都热切地盼望一种统一的页面开发技术 该技术应该具有的特点 与操作平台无关 能够在任何 Web 或应用程序服务 器上运行 将应用程序逻辑和页面显示分离 提供代码重用 简化开发基 于 Web 的交互式应用程序的过程 JSP Java Server Page 技术就是被设计用来满足这样的要求的 JSP 是 由 Sun MicroSystem 公司于 1999 年 6 月推出的新的网页开发技术 它是基于 Java Serv let 以及整个 Java 体系的 Web 开发技术 是 Servlet2 1API 的扩 展 利用这一技术 可以建立先进 安全和跨平台的动态网站 Java 是未来的主流开发技术 具有很多优势 JSP 则是 Java 在 Internet Intranet Web 上的重要应用技术 得到了广泛的支持和承认 它可 以和各种 Java 技术完好地结合在一起 从而实现非常复杂的应用 作为一种基于文本的 以显示为中心的开发技术 JSP 提供了 Java Servlet 的所有好处 为了做到逻辑功能和显示功能分开 JSP 已经可以和 JavaBeans Enterprise JavaBeans EJB 和 Servlet 一起工作 JSP 的开发 人员可以通过使用 JavaBeans EJB 和 Servlet 来完成大部分与网站逻辑相关的 工作 而仅仅把显示的工作交给 JSP 页面来完成 内容和显示逻辑分开的好处 在于 更新页面外观的人员不必懂得 Java 代码 而更新 Java 类的人员也不必 是设计网页的行家 这就可以用带 Java 类的 JSP 页面来定义 Web 模板 以建立 一个具有相似外观的页面组成的网站 Java 类完成数据提供 在模板中就没有 Java 代码 这意味着这些模板可以由一个 HTML 编写人员来维护 JSP 作为当前主流的网页开发技术 具有如下特点 1 将内容的生成和显示进行分离 使用 JSP 技术 Web 页面开发人员可 以使用 HTML 或者 XML 标识来设计和格式化最终的页面 使用 JSP 标识或者小脚 本来生成页面上的动态内容 内容是根据请求来变化的 生成内容的逻辑被封 装在标识和 JavaBeans 组件中 并且捆绑在小脚本中 所有的脚本在服务器端 运行 如果核心逻辑被封装在标识和 JavaBeans 中 那么其他人 如 Web 管理 人员和页面设计者 能够编辑和使用 JSP 页面 而不影响内容的生成 2 强调可重用的组件 绝大多数 JSP 页面依赖于可重用的 跨平台的组 件来完成应用程序所要求的更为复杂的处理 得益于 Java 的操作平台无关性 开发人员能够很方便共享和交流执行普通操作的组件 或者使得这些组件为更 多的使用者所使用 基于组件的方法加速了总体的开发过程 极大地提高了项 目整体开发的效率 虽然 JSP 功能强大 但是它要求网页开发人员对 Java 要相当熟悉 而现在 Java 程序员还比较少 对一般的网页开发人员来说 JSP 的语法还是比较难于 掌握的 所以 就需要有一种网页开发工具 为一般的网页开发人员提供常用 的 JSP 应用 让只懂得一般页面开发技术 HTML 的开发人员也能够使用 JSP 的强大功能 系统设计目标和使用的主要技术 1 设计目标 本系统的设计目标是为只懂得 HTML 但完全不了解 JSP 的一般网页开发人员 提供一个网页开发工具 使他们能够根据系统文档 通过标签使用 JSP 的常用 功能 最后生成一个只包含静态 HTML 和 JSP 标签的动态 JSP 网页 2 主要技术 本系统在设计时 主要考虑使用模板和 JSP 标签的技术来实现 1 模板技术 模板技术被广泛地应用于各种开发和应用系统中 它预先生成一些常用的 框架结构 使用户可以根据自己的需要方便地从模板库中选择模板 而不用自 己重新去搭建 节省了用户的开发时间 方便了用户的使用 在本系统中 将 页面按照功能类型进行分类 归纳出常用的页面类型 生成模板库 2 标签库技术 在 JSP 中 动作是可以创造与访问程序语言对象和影响输出流的元素 JSP 定义了六个标准的动作 除了这六个标准动作以外 用户可以定义自己的动作 来完成特定的功能 这些动作被称为客户化动作 它们是可重用的程序模块 通过这些动作 程序员就可以在 JSP 页面中把页面的显示功能也部分地封装起 来 使整个页面更加简洁和易于维护 在一个 JSP 页面中 这些客户化动作是 通过客户化标签来调用的 而标签库 Tag Library 就是客户化标签的集合 JSP 标签库是一种通过 JavaBeans 生成基于 XML 的脚本的方法 它是 JSP 的最大特点之一 通过标签库 能够无限制地扩展 JSP 应用 完成任何复杂的 应用需求 JSP 标签库具有以下特点 易于使用 JSP 中的标签和一般的 HTML 标记外表上是完全一样的 使用 起来和普通的 HTML 标记一样方便 易于代码重用 标签库中的每一个标签都能完成一定的功能 一旦定义好了 一个标签库 只需要把这个标签库包装成一个 Jar 文件 那么以后只要在别的 系统中使用这个标签库就行了 而不用重新开发代码 极大地提高了系统开发 效率 降低了开发成本 易于代码维护 所有的应用逻辑都封装在标签处理器和 JavaBeans 中 所有 的标签都集中在一个标签库中 如果需要更新代码或者需要修改一个网页上的 功能 只需要修改相应的标签即可 通过这种统一维护方式 不用在每个网页 上去作修改 极大地减少了维护的工作量 节约了维护成本 易于系统扩充 如果需要向系统中添加新的功能 只需要定义一个新的标签 来完成这一功能即可 无需对系统的其它方面作任何改动 标签库可以继承 JSP 规范各方面的特性 这样就可以无限制地扩展和增加 JSP 的功能 而不需 要等待下一版本 JSP 的出现 系统的组成和实现 1 系统组成 本系统主要由四个部分组成 1 数据库连接部分 本系统支持常用的几个数据库 包括 Oracle Sybase MSSQLServer MySQL 和 DB2 根据用户选择的数据库类型和 用户提供的数据库名称 用户名 密码使用 JDBC 同数据库相连 2 系统基本表生成部分 和数据库连接以后 根据同数据库相连的用户名 生成两个系统基本表 TC Tables 和 TC Columns TC Tables 表包含在该数据 库中属于该用户的所有的表的英文名称 中文名称和一些属性 如是否可修改 是否可查询等 TC Columns 表包含在该数据库中属于该用户的所有的表的所 有列的中英文名称和其它一些属性 如是否可显示 是否可查询等 这两个系 统基本表在整个系统的开发过程中提供用户所使用数据库的基本信息 3 模板选择和网页生成部分 该部分是系统的核心部分 它包含了两个子 模块 模板选择部分 系统为用户提供模板选择界面 让用户根据需要从模板 库中选择所要使用的模板 模板处理部分 根据用户选择的模板 系统调用指定的模板处理模块对 这个模板进行处理 当处理程序遇到模板中的标签时 就为用户提供交互界面 让用户为指定的标签输入参数 并由系统验证用户输入的标签的有效性 最后 由系统完成 JSP 页面的生成 4 网页预览和修改部分 网页生成出来以后 系统为用户提供了一个网页预览 窗口和代码查看修改窗口 通过这个预览窗口 用户可以预览一下生成出来的 JSP 页面的效果 如果用户对页面的静态方面的效果不太满意 用户可以通过 代码查看修改窗口修改代码中的 HTML 代码 如果用户对页面的静态效果有进一 步的要求 系统还为用户提供了一个调用 Dreamweaver 编辑器的接口 用户可 以使用它来对生成出来的 JSP 页面的静态效果进行进一步的修改和完善 2 系统的实现 1 模板库和标签库的实现 标签库的规划和设计在整个系统设计中至关重要 它关系到了代码重用的 程度和系统运行的效率 它的规划应该遵循以下原则 1 在标签中应该尽量少的包含静态的 HTML 对于一般用户来说 标签是 透明的 用户不能够查看和修改标签 如果在标签中包含了过多的静态 HT ML 语句 将影响用户对页面的静态效果的修改和完善 限制标签的使用 2 尽量提高代码的重用度 在对 JSP 应用进行分类是尽量把公用的 JSP 应 用提取出来 形成标签 而不用在每个标签中都重复实现该应用 这样在以后 要对该应用进行修改和完善时 只需对这一个标签进行修改即可 易于代码的 维护 3 方便用户的使用 在设计标签库时 应该充分考虑到用户的使用情况 使用户能够很容易和方便地理解和使用标签 标签库的定义 定义一个标签库 必须首先定义一个标签库描述文件 TLD 这是一个基于 XML 的脚本文件 在这个文件中定义了 XML 的版本 所 使用的编码 标签库的版本 所使用的 JSP 的版本 标签库的名称和这个库中 所包含的所有的标签的定义和参数描述 包括标签的名称 标签所对应的 Java 类 标签的描述信息等 标签的实现 一个标签就是一个特殊的 Java 类 这个类必须继承 TagSupport 类 这个类是在 javax servlet jsp tagext 包中定义的 在标 签类中 包含了这个标签的参数初始化方法 Set Get 标签的主体处理方法 Handler 以及供下一级标签调用的方法等 模板的实现 一个模板就是一个含有标签引用的 JSP 文件 为了在模板 中引用所定义的标签 必须首先引入标签库 tagliburi tag tld prefix ctag 其中 uri 指定标签库描述文件的路径 prefix 指定引用标签时所使用的前 缀 在模板中引用指定的标签时 使用引入标签库时所指定的前缀 指定标签 的名称 为标签的参数赋值 2 系统开发环境 本系统主体程序开发使用的是 Borland 公司的 JBuilder 6 0 模板开发 使用是 Microsoft 公司的 Front Page2000 标签库开发使用的是 UltraEdit 编辑器 JDK 采用的是 JDK1 4 系统测试环境是 JRun3 0 Java 是未来开发语言的主流 而 Java 在 Web 上的主要应用 JSP 也必将成 为未来 Web 开发的主流技术 本系统采用了 JSP 的最大特点之一的标签库 使 一般的 Web 开发人员也能够方便地使用 JSP 强大的动态页面功能 开发出技术 先进的 JSP 动态 Web 页面 由于本系统采用 Java 语言进行开发 所以可以在任 何支持图形化界面的操作系统下运行 实现了完全的与平台无关 本系统易于 扩充和完善 在以后可以考虑为用户提供接口 使用户可以自己扩充模板库和 标签库 进一步增强系统的功能 附件 2 外文原文 Produce the design of the tool and realize automatically on the basis of JSP webpage It is an important respect that Internet uses that Web develops technology and JSP is the most advanced technology that Web is developed it is present Web developer s first selected technology But because JSP has relatively high expectations for Web developer a lot of general Web developers can not use this advanced technology The discussion produces the design of the tool and realizes automatically on the basis of JSP webpage of the template and label storehouse put forward concrete design philosophy and implementation method With the popularization of WWW World Wide Web the technology of the dynamic webpage is developed rapidly too From original CGI Common Gateway In terface to ASP Active Server Page have met the webpage developer to the demand for developing technology of the dynamic webpage to a certain extent But no matter CGI or ASP have certain limitation for instance consuming to resources of the server of CGI ASP can only be used etc with Microsoft IIS all these have limited scope of application of the technology have hindered their popularization greatly The vast page developers all look forward to a kind of unified page and develop technology earnestly characteristic that this technology there should be Have nothing to do with the operating platform can run on any Web or the application program server Show the logic and page of application program that separates Offer codes to put in an position simplify and develop the course based on interactive application program of Web JSP Java Server Page technology is designed and used for responding to the request that like this JSP is developed technology by the new webpage that Sun MicroSystem Company put out in June of 1999 it is that Web based on Java Serv let and the whole Java system develops technology and Servlet2 Expansion of 1API Utilize this technology can set up advancedly safely and stepping dynamic websites of the platform Java is the future mainstream to develop technology have a lot of advantages JSP is Java important application technology on Internet Intranet Web get extensive support and admit it can conbine with various kinds of Java technology together intactly thus realize very complicated application As a kind of technology of development based on text taking showing as centre JSP has offered all advantages of Java Servlet Logic function in order to make sure and showing the function was separated JSP can already work with JavaBeans Enterprise JavaBeans EJB and Servlet The developer of JSP can finish the work that majority and website s logic are correlated with through using JavaBeans EJB and Servlet and only assign the work shown to JSP page to finish Content and show advantage that logic separate lie in upgrade person page of appearance needn t understand Java code the personnel upgrading Javas needn t be experts who design webpage either This can define Web template in JSP page with Javas in order to set up websites made up of a page with similar appearance Java completion data offer have Java code among template this mean template these can write by one HTML person is it maintain to come JSP develops technology as the webpage of the mainstream at present has the following characteristics 1 Separate the formulation and showing of the content Using JSP technology the page developer of Web can use HTML or XML identification to design and format the final page Use JSP identification or bound foot turn into dynamic content of page actually whether content according to is it come change to ask Produce logic of content of the identification and JavaBeans package truss up of the little script encapsulation all scripts run in the end of the server If key logic among identification and JavaBeans then other people such as Web administrative staff and page designer encapsulation can edit and use JSP page and does not influence the formulation of the content 2 Emphasize the reusable package Most JSP pages depend on the reusable one the package stepping the platform finish more complicated treatment with required application program Benefitting from the independence of operating platform of Java the developer can be very convenient to share and exchange and carry out the ordinary package that operated or make these packages used by more users The method based on package has accelerated the total development course the efficiency of improving the project and developing wholly greatly Though JSP is powerful it requires the webpage developer should be quite familiar with Java There are still relatively few Java programmers now for general webpage developer the grammar of JSP is more difficult to grasp So need a kind of webpage developing instrument and offer commonly used JSP application to general webpage developer is it understand general page develop developer of technology HTML can use strong function of JSP too only to let Systematic design object and main technology of use 1 Design object System this design object for understand but HTML understand general webpage developer of JSP offer a webpage developing instrument at all only enable them to follow the systematic file use the daily function of JSP through the label produce one finally and only include static HTML and dynamic JSP webpage of JSP label 2 Main technology This system is in the design consider using the technology of the template and JSP label to realize mainly 1 Technology of the template The technology of the template is widely applied to various kinds of development and application system It produces some commonly used frame structure in advance uses the family to choose the template from the template storehouse conveniently according to the needs of one s own one is it is it put up to go again by oneself to need save construction period in user facilitate use of user In this system classify the page according to the function type sum up the commonly used page type produce the template storehouse 2 Storehouse technology of the label In JSP movements can create and visit the language target of the procedure and influence the element exported and flowed JSP has defined six standard movements Except six standard movement these user can define own movement finish the specific function These movements are known as the customer movement they are the reusable procedure module Through movement these programmer can some encapsulation stand up too display function of page in JSP page make the whole page more succinct and easier to maintain In a JSP page movements were transfered through the customer label in these customers And the label storehouse Tag Library is the set of the customer label JSP label storehouse is that one kind produces the method based on script of XML through JavaBeans It is one of the greatest characteristics of JSP Through the label storehouse can expand JSP application unrestrictedly finish any complicated application demand JSP label storehouse has the following characteristic Easy to use The labels in JSP and general HTML marks are totally the same in appearance it is as convenient as ordinary HTML mark to use The easy code is paid most attention to Every label in the label storehouse can finish certain function Define ready to eat one label storehouse is it pack one Jar file the label storehouse to need only then only need use this label storehouse in other systems afterwards needn t develop codes again has raised the system and developed efficiency greatly have reduced the development cost The easy code is safeguarded All application logic is encapsulated in label processor and JavaBeans all labels concentrate on a label storehouse If need to upgrade codes or need to revise the function on a webpage only need to revise the corresponding label Maintain way in unison through this kind it is unnecessary in each webpage is it is it fix to act as to get onning have reduce the work load safeguarded greatly has economized the cost of safeguarding The easy system is expanded If need to add the new function to the system only need to define a new label to finish this function do not need to do any change to other respects of the system Can inherit JSP normal characteristics of various fields in the label storehouse Can expand and increase the function of JSP unrestrictedly like this and does not need to wait for the appearance of the next edition JSP Systematic composition and realizing 1 The system making up This system is made up of four parts mainly 1 The database joins some This system supports several daily databases including Oracle Sybase MSSQLServer MySQL and DB2 use JDBC and database to link to each other according to database type and database name user name password that users offer that users choose 2 The basic form of system produces some After joining with the database produce the basic form TC Tables and TC Columns of two systems according to the user name linking to each other with the database TC Tables form includes English name Chinese name and some attribute of form belonging to this user in this database for instance can revise can inquire about The Chinese and English name of the row and some other attribute that TC Columns form includes belonging to all forms of this user s in this database For instance can show can inquire about Basic information of the database that these basic forms of two systems provide to user s institute for use in the course of development of the whole system 3 The template is chosen to produce some with the webpage This part is a key part of a system It includes two pieces of sub module The template is chosen some The system offers the template to user and chooses the interface let users choose the templates used from the template storehouse according to the need The template is dealt with some According to template that user choose system transfer designated template deal with module is it punish to go on to these template When dealing with the label that the procedure meets in the template offer the mutual interface to user let user input parameter for designated label prove system validity of label that user input Finished the formulation of JSP page systematically finally Webpage preview is with revising some After the webpage was produced out the system has offered a webpage preview window and code to user and looked over that revises the window Through this preview window users can look at the result of JSP page produced out in advance If user static result of respect in page very satisfied user can through code look over revise window revise HTML code of code If users have further demands for the static result of the page the system has also offered a piece of interface which transfers DreamWeaver editing machine to user users can use it to carry on further modification and perfection to the static result of JSP page that is produced out 2 Systematic realization 1 Realization of the template storehouse and label storehouse The planning and design of the label storehouse are essential in the whole system design efficiency that the degree and system that are put in an position have operated that its relation has reached codes Its planning should follow the following principle 1 Should try one s best little including static HTML among label To general user the label is transparent Users can not look over and revise labels If include too many static HT ML sentence in the label will influence the modification and perfection of user s static result to the page limit the use of the label 2 Try one s best to raise the paying most attention to degree of the code Is it is it is it is it is it is it get to JSP public JSP out to withdraw to use to try one s best to classify to go on to use form labels Do not use and realize this application repeatedly in each label While revising and perfecting to using like this only need to revise this label maintenance of the easy code 3 Facilitate users use While designing the label storehouse should fully consider users operating position it can very easy and understanding and using labels conveniently to use the family Definition of the label storehouse Define a label storehouse must define a label storehouse and describe the file TLD at first This is a file of script based on XML have defined the edition of XML in this file codes used the edition name and definition and parameter of all labels included in this storehouse of the label storehouse of the edition of the label storehouse JSP used describe including the name of the label corresponding Javas of label description information of the label etc Realization of the label One label first special Java typ

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论