JSP技术概述与应用框架外文翻译毕业设计(共20页).doc
《JSP技术概述与应用框架外文翻译毕业设计(共20页).doc》由会员分享,可在线阅读,更多相关《JSP技术概述与应用框架外文翻译毕业设计(共20页).doc(20页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精选优质文档-倾情为你奉上附件1:外文原文Overview of JSP Technology and JSP application frameworks1 Benefits of JSP 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 p
2、ages are equally appropriate 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 l
3、anguage. But it still matters which you choose.JSP provides the following benefits over servlets alone: 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.
4、 Even HTML tools that know nothing about JSP can be used because they simply ignore 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 importa
5、nt. Depending on the size of your team and the complexity of your project, you can 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 project
6、s will use both. For some requests in your project, you will use servlets. For others, you will use JSP. For still others, you will combine them with the MVC architecture . You want the appropriate tool for the job, and servlets, by themselves, do not complete your toolkit.2.Advantages of JSP Over C
7、ompeting Technologies 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-level manager from a
8、 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 seemed t
9、o 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 strategy. At this point, Gosling lightheartedly interjected You mean disgrace and distend. Now, the grievance that Gosling was airi
10、ng was 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 and dynamic code marked with special ta
11、gs. For example, ColdFusion 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 spec
12、ial tags as ASP did.So, the question becomes: why use JSP instead of one of these other technologies? Our first response is that we are not arguing that everyone should. Several of those other technologies are quite good and are reasonable options in some situations. In other situations, however, JS
13、P is clearly better. Here are a few of the reasons.2.1 Versus .NET and Active Server Pages (ASP). NET is well-designed technology from Microsoft. ASP.NET is the part that directly competes with servlets and JSP. The advantages of JSP are two fold.First, JSP is portable to multiple operating systems
14、and Web servers; you arent locked into deploying on Windows and IIS. Although the core .NET platform runs on a few non-Windows platforms, the ASP part does not. You cannot expect to deploy serious ASP.NET applications on multiple servers and operating systems. For some applications, this difference
15、does not matter. For others, it matters greatly.Second, for some applications the choice of the underlying language matters greatly. For example, although .NETs C# language is very well designed and is similar to Java, fewer programmers are familiar with either the core C# syntax or the many auxilia
16、ry libraries. In addition, many developers still use the original version of ASP. With this version, JSP has a clear advantage for the dynamic code. With JSP, the dynamic part is written in Java, not VBScript or another ASP-specific language, so JSP is more powerful and better suited to complex appl
17、ications that require reusable components. You could make the same argument when comparing JSP to the previous version of ColdFusion; with JSP you can use Java for the real code and are not tied to a particular server product. However, the current release of ColdFusion is within the context of a J2E
18、E server, allowing developers to easily mix ColdFusion and servlet/JSP code.2.2 Versus PHP PHP (a recursive acronym for PHP: Hypertext Preprocessor) is a free, open-source, HTML-embedded scripting language that is somewhat similar to both ASP and JSP. One advantage of JSP is that the dynamic part is
19、 written in Java, which already has an extensive API for networking, database access, distributed objects, and the like, whereas PHP requires learning an entirely new, less widely used language. A second advantage is that JSP is much more widely supported by tool and server vendors than is PHP.2.3 V
20、ersus Pure Servlets JSP doesnt provide any capabilities that couldnt, in principle, be accomplished with servlets. In fact, JSP documents are automatically translated into servlets behind the scenes. But it is more convenient to write (and to modify!) regular HTML than to use a zillion println state
21、ments to generate the HTML. Plus, by separating the presentation from the content, you can put different people on different tasks: your Web page design experts can build the HTML by using familiar tools and either leave places for your servlet programmers to insert the dynamic content or invoke the
22、 dynamic content indirectly by means of XML tags.Does this mean that you can just learn JSP and forget about servlets? Absolutely not! JSP developers need to know servlets for four reasons: 1. JSP pages get translated into servlets. You cant understand how JSP works without understanding servlets. 2
23、. JSP consists of static HTML, special-purpose JSP tags, and Java code. What kind of Java code? Servlet code! You cant write that code if you dont understand servlet programming. 3. Some tasks are better accomplished by servlets than by JSP. JSP is good at generating pages that consist of large sect
24、ions of fairly well structured HTML or other character data. Servlets are better for generating binary data, building pages with highly variable structure, and performing tasks (such as redirection) that involve little or no output. 4. Some tasks are better accomplished by a combination of servlets
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- JSP 技术 概述 应用 框架 外文 翻译 毕业设计 20
限制150内