java超市会员管理系统毕业设计外文翻译.doc

上传人:韩长文 文档编号:5175600 上传时间:2020-02-15 格式:DOC 页数:10 大小:47KB
返回 下载 相关 举报
java超市会员管理系统毕业设计外文翻译.doc_第1页
第1页 / 共10页
java超市会员管理系统毕业设计外文翻译.doc_第2页
第2页 / 共10页
java超市会员管理系统毕业设计外文翻译.doc_第3页
第3页 / 共10页
java超市会员管理系统毕业设计外文翻译.doc_第4页
第4页 / 共10页
java超市会员管理系统毕业设计外文翻译.doc_第5页
第5页 / 共10页
亲,该文档总共10页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《java超市会员管理系统毕业设计外文翻译.doc》由会员分享,可在线阅读,更多相关《java超市会员管理系统毕业设计外文翻译.doc(10页珍藏版)》请在三一文库上搜索。

1、 毕业设计说明书英文文献及中文翻译班 级: 学号: 软件学院姓 名: 软件工程学 院: 专 业: 指导教师: 2014年6月 StrutsWriter:Lebron BryantApache Struts is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model-view-controller (MVC) architec

2、ture. It was originally created by Craig McClanahan and donated to the Apache Foundation in May, 2000. Formerly located under the Apache Jakarta Project and known as Jakarta Struts, it became a top level Apache project in 2005. Design goals and overview In a standard Java EE web application, the cli

3、ent will typically submit information to the server via a web form. The information is then either handed over to a Java Servlet which processes it, interacts with a database and produces an HTML-formatted response, or it is given to a JavaServer Pages (JSP) document which intermingles HTML and Java

4、 code to achieve the same result. Both approaches are often considered inadequate for large projects because they mix application logic with presentation and make maintenance difficult. The goal of Struts is to cleanly separate the model (application logic that interacts with a database) from the vi

5、ew (HTML pages presented to the client) and the controller (instance that passes information between view and model). Struts provides the controller (a servlet known as ActionServlet) and facilitates the writing of templates for the view or presentation layer (typically in JSP, but XML/XSLT and Velo

6、city are also supported). The web application programmer is responsible for writing the model code, and for creating a central configuration file struts-config.xml which binds together model, view and controller.Requests from the client are sent to the controller in the form of “Actions” defined in

7、the configuration file; if the controller receives such a request it calls the corresponding Action class which interacts with the application specific model code. The model code returns an “ActionForward”, a string telling the controller which output page to send to the client. Information is passe

8、d between model and view in the form of special JavaBeans. A powerful custom tag library allows it to read and write the content of these beans from the presentation layer without the need for any embedded Java code. Struts also supports i18n (internationalization), provides facilities for the valid

9、ation of data submitted by web forms, and includes a template mechanism called “Tiles” which (for instance) allows the presentation layer to be composed from independent header, footer, and content components. Competing MVC frameworks Although Struts is a well documented, mature and popular framewor

10、k for building front ends to Java applications, it is facing new challenges from newer “light weight” MVC frameworks such as Spring MVC, Stripes and Tapestry. The new XForms standards and frameworks may also be another option to building complex web Form validations with Struts in the future. The We

11、bWork framework spun off from Apache Struts several years ago, aiming to offer enhancements and refinements while retaining the same general architecture of the original Struts framework. However, it was announced in December 2005 that Struts would re-merge with WebWork. WebWork 2.2 has been adopted

12、 as Apache Struts 2, which reached its first full release in February 2007. Sun recently brought out a new addition to the Java platform, called JavaServer Faces (JSF). Aside from the original framework, the Apache Struts project also offers a JSF-based framework called Shale. Other MVC frameworks t

13、hat are not J2EE based include Ruby on Rails, WebObjects, Django, Catalyst, TurboGears, CakePHP, Symfony (for PHP), Zend, Achievo ATK, and CodeIgniter (for PHP). Struts4php is a version of the Struts framework for the PHP web scripting language. Girders is a port of the Struts framework in C# for Mi

14、crosoft .NET.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

15、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 After Sun release the JS P( the Java Server Pages) formally, t

16、he 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

17、on the market at inside of 85% server product.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, ple

18、asing the book of consult the homologous JSP.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

19、 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 mixes with a certain procedure code and is explain by the language engine to carry out the procedure code in the

20、 code of HTML. Underneath we are simple of carry on the introduction to it.JSP pages are translated into servlets. So, fundamentally, any task JSP pages can perform could also be accomplished by servlets. However, this underlying equivalence does not mean that servlets and JSP pages are equally appr

21、opriate in all scenarios. The issue is not the power of the technology, it is the convenience, productivity, and maintainability of one or the other. After all, anything you can do on a particular computer platform in the Java programming language you could also do in assembly language. But it still

22、 matters which you choose.It is easier to write and maintain the HTML. Your static code is ordinary HTML: no extra backslashes, no double quotes, and no lurking Java syntax.You can use standard Web-site development tools. Even HTML tools that know nothing about JSP can be used because they simply ig

23、nore the JSP tags.You can divide up your development team. The Java programmers can work on the dynamic code. The Web developers can concentrate on the presentation layer. On large projects, this division is very important. Depending on the size of your team and the complexity of your project, you c

24、an enforce a weaker or stronger separation between the static HTML and the dynamic content.Now, this discussion is not to say that you should stop using servlets and use only JSP instead. By no means. Almost all projects will use both. For some requests in your project, you will use servlets. For ot

25、hers, you will use JSP. For still others, you will combine them with the MVC architecture . You want the apGFDGpropriate tool for the job, and servlets, by themselves, do not complete your toolkit. The technique of JSP of the company of Sun, making the page of Web develop the personnel can use the H

26、TML perhaps marking of XML to design to turn the end page with format. Use the perhaps small script future life of marking of JSP becomes the dynamic state 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 appli

27、es the development of the procedure to need the Java Servlet to match with 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 do any tr

28、anslation, 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 efficienc

29、y, also need not use only the ability come to born page of Web of dynamic state in the method of API that a certain fixed Web server terrace circulate. Many servers of Web all support the Servlet, even not support the Servlet server of Web directly and can also pass the additional applied server and

30、 the mold 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 serve

31、r 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 several claim service, therefore the efficiency of Java Servlet is very high.But the Java

32、 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

33、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 nex

34、t to Marty was James Gosling, inventor of the Java programming language. Sitting several seats away was a high-level manager 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. T

35、he moderator asked the manager what he thought of it, and the manager responded that it was too early to tell, but that it seemed to be an excellent idea. He went on to say that they would keep an eye on it, and if it seemed to be catching on, they would follow his companys usual embrace and extend

36、strategy. At this point, Gosling lightheartedly interjected You mean disgrace and distend. Struts作者:勒布朗 布莱恩特Struts 是 Apache软件基金会(ASF)赞助的一个开源项目。它最初是 Jakarta项目中的一个子项目,并在2004年3月成为ASF的顶级项目。它通过采用 Java Servlet/JSP 技术,实现了基于Java EE Web应用的 Model-ViewController(MVC)设计模式的应用框架(Web Framework),是 MVC 经典设计模式中的一个经典产

37、品。 MVC结构 在 Struts 中,已经由一个名为 ActionServlet 的 Servlet 充当控制器(Controller)的角色,根据描述模型、视图、控制器对应关系的 struts-config.xml 的配置文件,转发视图(View)的请求,组装响应数据模型(Model)。在 MVC 的 模型(Model)部分,经常划分为两个主要子系统(系统的内部数据状态与改变数据状态的逻辑动作),这两个概念子系统分别具体对应 Struts 里的 ActionForm 与 Action 两个需要继承实现超类。在这里,Struts 可以与各种标准的数据访问技术结合在一起,包括Enterpris

38、e Java Beans(EJB), JDBC 与 JNDI。在 Struts 的视图(View) 端,除了使用标准的JavaServer Pages(JSP)以外,还提供了大量的标签库使用,同时也可以与其他表现层组件技术(产品)进行整合,比如 Velocity Templates,XSLT 等。通过应用 Struts 的框架,最终用户可以把大部分的关注点放在自己的业务逻辑(Action)与 映射关系的配置文件(struts-config.xml)中。 发展历程 在 Java EE 的Web应用发展的初期,除了使用 Servlet 技术以外,普遍是在 JavaServer Pages (JSP

39、)的源代码中,采用 HTML 与 Java 代码混合的方式进行开发。因为这两种方式不可避免的要把表现与业务逻辑代码混合在一起,都给前期开发与后期维护带来巨大的复杂度。为了摆脱上述的约束与局限,把业务逻辑代码从表现层中清晰的分离出来,2000年,Craig McClanahan 采用了 MVC 的设计模式开发Struts。后来该框架产品一度被认为是最广泛、最流行 JAVA 的 WEB 应用框架。 2006年,WebWork 与 Struts 这两个优秀的Java EE Web框架(Web Framework)的团体,决定合作共同开发一个新的,整合了 WebWork 与 Struts 优点,并且更

40、加优雅、扩展性更强的框架,命名为 “Struts 2”,原Struts的1.x 版本产品称为”Struts 1”。 至此,Struts项目并行提供与维护两个主要版本的框架产品Struts 1 与 Struts 2。 充满竞争的MVC框架 虽然Struts的是成熟的和流行的框架,建设前端Java应用,它正面临新的挑战,从较新的”轻量”的MVC框架,如Spring的MVC ,Stripes和Tapestry 。新的XForms标准和框架,也可能是另一种选择,以建立复杂的Web窗体验证与Struts的未来。 在WebWork框架脱离Apache的Struts的几年前,以提供改进和完善,同时保持了相同

41、的一般建筑的原始Struts框架。然而,它在2005年12月宣布,该框架将重新合并WebWork 。WebWork 2.2已获得通过,成为Apache的Struts的2 ,达到了第一个完整的版本于2007年2月。 Sun公司最近提出了一项新的除了Java平台,所谓的JavaServer界面(SF) 。除了原有的框架下, Apache的Struts的项目还提供了一个JSF的为基础的框架,所谓的页岩。 其他的MVC框架,并不是基于J2EE的包括Ruby on Rails的, WebObjects , Django ,Catalyst, TurboGears , CakePHP , Symfony

42、(对于PHP ),Zend公司,大展ATK公司,并CodeIgnite(对于PHP )。 Struts4php是一个Struts框架的PHP的web脚本语言版本。Girders是微软.NET基于C 的Struts框架的一部分。 Java Server Pages(JSP)是一种基于web的脚本编程技术,类似于网景公司的服务器端Java脚本语言 server-side JavaScript(SSJS)和微软的Active Server Pages(ASP)。与SSJS和ASP相比,JSP具有更好的可扩展性,并且它不专属于任何一家厂商或某一特定的Web服务器。尽管JSP规范是由Sun公司制定的,但

43、任何厂商都可以在自己的系统上实现JSP。 在Sun正式发布JSP(Java Server Pages)之后,这种新的Web应用开发技术很快引起了人们的关注。JSP为创建高度动态的Web应用提供了一个独特的开发环境。按照Sun的说法,JSP能够适应市场上包括Apache WebServer、IIS4.0在内的85%的服务器产品。本文将介绍JSP相关的知识,以及JavaBean的相关内容,当然都是比较粗略的介绍其中的基本内容,仅仅起到抛砖引玉的作用,如果读者需要更详细的信息,请参考相应的JSP的书籍。 JSP(Java Server Pages)是由Sun Microsystems公司倡导、许多公

44、司参与一起建立的一种动态网页技术标准,其在动态网页的建设中有其强大而特别的功能。JSP与Microsoft的ASP技术非常相似。两者都提供在HTML代码中混合某种程序代码、由语言引擎解释执行程序代码的能力。下面我们简单的对它进行介绍。JSP页面最终会转换成servlet。因而,从根本上,JSP页面能够执行的任何任务都可以用servlet来完成。然而,这种底层的等同性并不意味着servlet和JSP页面对于所有的情况都等同适用。问题不在于技术的能力,而是二者在便利性、生产率和可维护性上的不同。毕竟,在特定平台上能够用Java编程语言完成的事情,同样可以用汇编语言来完成,但是选择哪种语言依旧十分重

45、要。和单独使用servlet相比,JSP提供下述好处: JSP中HTML的编写与维护更为简单。JSP中可以使用常规的HTML:没有额外的反斜杠,没有额外的双引号,也没有暗含的Java语法。 能够使用标准的网站开发工具。即使是那些对JSP一无所知的HTML工具,我们也可以使用,因为它们会忽略JSP标签(JSP tags)。 可以对开发团队进行划分。Java程序员可以致力于动态代码。Web开发人员可以将经理集中在表示层(presentation layer)上。对于大型的项目,这种划分极为重要。依据开发团队的大小,及项目的复杂程度,可以对静态HTML和动态内容进行弱分离(weaker separa

46、tion)和强分离(stronger separation)。此处的讨论并不是说人们应该放弃使用servlet而仅仅使用JSP。事实上,几乎所有的项目都会同时用到这两种技术。在某些项目中,更适宜选用servlet,而针对项目中的某些请求,我们可能会在MVC构架下组合使用这两项技术。我们总是希望用适当的工具完成相对应的工作,仅仅是servlet并不一定能够胜任所有工作。 Sun公司的JSP技术,使Web页面开发人员可以使用HTML或者XML标识来设计和格式化最终页面。使用JSP标识或者小脚本来生成页面上的动态内容(内容是根据请求来变化的)。 Java Servlet是JSP技术的基础,而且大型的

47、Web应用程序的开发需要Java Servlet和JSP配合才能完成,Servlet这个名称源于Applet,现在国内的翻译方式很多,本书为了避免误会,决定直接采用Servlet而不做任何翻译,读者如果愿意,可以称之为“小服务程序”。Servlet其实和传统的CGI、ISAPI、NSAPI等Web程序开发工具的作用是相似的,在使用Java Servlet以后,用户不必再使用效率低下的CGI方式,也不必使用只能在某个固定Web服务器平台运行的API方式来动态生成Web页面。许多Web服务器都支持Servlet,即使不直接支持Servlet的Web服务器也可以通过附加的应用服务器和模块来支持Ser

48、vlet。得益于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技术。主席向该经理询问他的想法.他回答说,虽然现在言之过早,但这看起来会是非常有前途的一项技术。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 项目管理


经营许可证编号:宁ICP备18001539号-1