外文翻译---JSP技术与主流JAVA EE开源框架(SSH)技术简介.docx_第1页
外文翻译---JSP技术与主流JAVA EE开源框架(SSH)技术简介.docx_第2页
外文翻译---JSP技术与主流JAVA EE开源框架(SSH)技术简介.docx_第3页
外文翻译---JSP技术与主流JAVA EE开源框架(SSH)技术简介.docx_第4页
外文翻译---JSP技术与主流JAVA EE开源框架(SSH)技术简介.docx_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

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

文档简介

河北科技师范学院本科毕业设计外文翻译JSP technology and mainstream open-source framework for JAVA EE院(系、部)名 称 : 工商管理学院 专 业 名 称:信息管理与信息系统 学 生 姓 名:李建波 学 生 学 号:0811080211 指 导 教 师:刘书霞 2012年 5月 18日河北科技师范学院教务处制JSP technology and mainstream open-source framework for JAVAEE1. JSP Profile JSP (Java Server Pages) is initiated by Sun Microsystems, Inc., with many companies to participate in the establishment of a dynamic web page technical standards. JSP technology somewhat similar to ASP technology, it is in the traditional HTML web page document (*.htm, *. html) to insert the Java programming paragraph (Scriptlet) and JSP tag (tag), thus JSP documents (*.jsp). Using JSP development of the Web application is cross-platform that can run on Linux, is also available for other operating systems. JSP technology to use the Java programming language prepared by the category of XML tags and scriptlets, to produce dynamic pages package processing logic. Page also visit by tags and scriptlets exist in the services side of the resources of logic. JSP page logic and web page design and display separation, support reusable component-based design, Web-based application development is rapid and easy.Web server in the face of visits JSP page request, the first implementation of the procedures of, and then together with the results of the implementation of JSP documents in HTML code with the return to the customer. Insert the Java programming operation of the database can be re-oriented websites, in order to achieve the establishment of dynamic pages needed to function.JSP and Java Servlet, is in the implementation of the server, usually returned to the client is an HTML text, as long as the client browser will be able to visit. JSP 1.0 specification of the final version is launched in September 1999, December has introduced 1.1 specifications. At present relatively new is JSP1.2 norms, JSP2.0 norms of the draft has also been introduced. JSP pages from HTML code and Java code embedded in one of the components. The server was in the pages of client requests after the Java code and then will generate the HTML pages to return to the client browser. Java Servlet JSP is the technical foundation and large-scale Web application development needs of Java Servlet and JSP support to complete. JSP with the Java technology easy to use, fully object-oriented, and a platform-independent and secure mainly for all the characteristics of the Internet. JSP technology strength: (1) time to prepare, run everywhere. At this point Java better than PHP, in addition to systems, the code not to make any changes.(2) the multi-platform support. Basically on all platforms of any development environment, in any environment for deployment in any environment in the expansion. Compared ASP / PHP limitations are obvious. (3) a strong scalability. From only a small Jar documents can run Servlet / JSP, to the multiple servers clustering and load balancing, to multiple Application for transaction processing, information processing, a server to numerous servers, Java shows a tremendous Vitality. (4) diver sification and powerful development tools support. This is similar to the ASP, Java already have many very good development tools, and many can be free, and many of them have been able to run on a variety of platforms under. JSP technology vulnerable:(1) and the same ASP, Java is the advantage of some of its fatal problem. It is precisely because in order to cross-platform functionality, in order to extreme stretching capacity, greatly increasing the complexity of the product. (2) Javas speed is class to complete the permanent memory, so in some cases by the use of memory compared to the number of users is indeed a minimum cost performance. On the other hand, it also needs disk space to store a series of. Java documents and. Class, as well as the corresponding versions of documents. 2. J2EE Development FrameworkJava2 Enterprise Edition middleware unified ideology played a significant role. For example, J2EE for distributed transaction management, directory services and messaging services provide a standard programming interface. J2EE-based -Java2Standard Edition (J2SE), successfully access for Java provides a standard relational database.But, as this article J2EE programming of the lack of support, as mentioned, J2EEplatform does not provide a satisfactory application programming model. Sun and some of the major application server vendors wanted to use the development tools to reduce the complexity of J2EE development, but these tools are no other outstanding JAVA development tools, which have advanced refactoring tools, and. NET platform compared, J2EE tool support appeared to be very inferior.Many J2EE development tools automatically generate the code for the same complex as the tools themselves. In many small-scale J2EE open source community developers chose another way of development - some can be difficult to reduce the development of J2EE development framework, the more popular such as: Struts, Hibernate, and Spring Framework, J2EE project types in many of today they play an important the role.2.1 Spring FrameworkThe Spring Framework is an open source application framework for the Java platform.The first version was written by Rod Johnson who released the framework with the publication of his book Expert One-on-One J2EE Design and Development in October 2002. The framework was first released under the Apache 2.0 license in June 2003. The first milestone release, 1.0, was released in March 2004, with further milestone releases in September 2004 and March 2005. The Spring 1.2.6 framework won a Jolt productivity award and a JAX Innovation Award in 2006. Spring 2.0 was released in October 2006, and Spring 2.5 in November 2007. In December 2009 version 3.0 GA was released. The current version is 3.0.5.The core features of the Spring Framework can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. Although the Spring Framework does not impose any specific programming model, it has become popular in the Java community as an alternative to, replacement for, or even addition to the Enterprise JavaBean (EJB) model.Modules The Spring Framework comprises several modules that provide a range of services:Inversion of Control container: configuration of application components and lifecycle management of Java objectsAspect-oriented programming: enables implementation of cross-cutting routinesData access: working with relational database management systems on the Java platform using JDBC and object-relational mapping toolsTransaction management: unifies several transaction management APIs and coordinates transactions for Java objectsModel-view-controller: an HTTP and Servlet-based framework providing hooks for extension and customizationRemote Access framework: configurative RPC-style export and import of Java objects over networks supporting RMI, CORBA and HTTP-based protocols including web services (SOAP)Convention-over-configuration: a rapid application development solution for Spring-based enterprise applications is offered in the Spring model.Batch processing: a framework for high-volume processing featuring reusable functions including logging/tracing, transaction management, job processing statistics, job restart, skip, and resource managementAuthentication and authorization: configurable security processes that support a range of standards, protocols, tools and practices via the Spring Security sub-project (formerly Acegi Security System for Spring).Remote Management: configurative exposure and management of Java objects for local or remote configuration via JMXMessaging: configurative registration of message listener objects for transparent message consumption from message queues via JMS, improvement of message sending over standard JMS APIsTesting: support classes for writing unit tests and integration testsInversion of Control container Central to the Spring Framework is its Inversion of Control container, which provides a consistent means of configuring and managing Java objects using callbacks. The container is responsible for managing object lifecycles: creating objects, calling initialization methods, and configuring objects by wiring them together.Objects created by the container are also called Managed Objects or Beans. Typically, the container is configured by loading XML files containing Bean definitions which provide the information required to create the beans.Objects can be obtained by means of Dependency lookup or Dependency injection. Dependency lookup is a pattern where a caller asks the container object for an object with a specific name or of a specific type. Dependency injection is a pattern where the container passes objects by name to other objects, via either constructors, properties, or factory methods.In many cases its not necessary to use the container when using other parts of the Spring Framework, although using it will likely make an application easier to configure and customize. The Spring container provides a consistent mechanism to configure applications and integrates with almost all Java environments, from small-scale applications to large enterprise applications.The container can be turned into a partially-compliant EJB3 container by means of the Pitchfork project. The Spring Framework is criticized by some as not being standards compliant. However, Spring Source doesnt see EJB3 compliance as a major goal, and claims that the Spring Framework and the container allow for more powerful programming models.Aspect-oriented programming framework The Spring Framework has its own AOP framework which modularizes cross-cutting concerns in aspects. The motivation for creating a separate AOP framework comes from the belief that it would be possible to provide basic AOP features without too much complexity in either design, implementation, or configuration. The SAOP framework also takes full advantage of the Spring Container.The Spring AOP framework is interception based, and is configured at runtime. This removes the need for a compilation step or load-time weaving. On the other hand, interception only allows for public or protected method execution on existing objects at a join point.Compared to the AspectJ framework, Spring AOP is less powerful but also less complicated. Spring 1.2 includes support to configure AspectJ aspects in the container. Spring 2.0 added more integration with AspectJ; for example, the pointcut language is reused and can be mixed with SpAOP-based aspects. Further, Spring 2.0 added a Spring Aspects library which uses AspectJ to offer common Spring features such as declarative transaction management and dependency injection via AspectJ compile-time or load-time weaving. Spring Source also uses AspectJ for AOP in other Spring projects such as Spring Roo and Spring Insight, with Spring Security also offering an AspectJ-based aspect library.Spring AOP has been designed to make it able to work with cross-cutting concerns inside the Spring Framework. Any object which is created and configured by the container can be enriched using Spring AOP.The Spring Framework uses Spring AOP internally for transaction management, security, remote access, and JMX.Since version 2.0 of the framework, Spring provides two approaches to the AOP configuration:schema-based approach.AspectJ-based annotation style.The Spring team decided not to introduce new AOP-related terminology; therefore, in the Spring reference documentation and API, terms such as aspect, join point, advice, pointcut, introduction, target object (advised object), AOP proxy, and weaving all have the same meanings as in most other AOP frameworks (particularly AspectJ).Data access framework Springs data access framework addresses common difficulties developers face when working with databases in applications. Support is provided for all popular data access frameworks in Java: JDBC, iBatis, Hibernate, JDO, JPA, Oracle Top Link, Apache OJB, and Apache Cayenne, among others.For all of these supported frameworks, Spring provides these features:Resource management - automatically acquiring and releasing database resourcesException handling - translating data access related exception to a Spring data access hierarchyTransaction participation - transparent participation in ongoing transactionsResource unwrapping - retrieving database objects from connection pool wrappersAbstraction for BLOB and CLOB handlingAll these features become available when using Template classes provided by Spring for each supported framework. Critics say these Template classes are intrusive and offer no advantage over using (for example) the Hibernate API. directly. In response, the Spring developers have made it possible to use the Hibernate and JPA APIs directly. This however requires transparent transaction management, as application code no longer assumes the responsibility to obtain and close database resources, and does not support exception translation.Together with Springs transaction management, its data access framework offers a flexible abstraction for working with data access frameworks. The Spring Framework doesnt offer a common data access API; instead, the full power of the supported APIs is kept intact. The Spring Framework is the only framework available in Java which offers managed data access environments outside of an application server or container. While using Spring for transaction management with Hibernate, the following beans may have to be configured.Transaction management framework Springs transaction management framework brings an abstraction mechanism to the Java platform. Its abstraction is capable of working with local and global transactions (local transaction does not require an application server).working with nested transactions working with transaction safe points working in almost all environments of the Java platformIn comparison, JTA only supports nested transactions and global transactions, and requires an application server (and in some cases also deployment of applications in an application server).The Spring Framework ships a Platform Transaction Manager for a number of transaction management strategies:Transactions managed on a JDBC ConnectionTransactions managed on Object-relational mapping Units of WorkTransactions managed via the JTA Transaction Manager and User TransactionTransactions managed on other resources, like object databasesNext to this abstraction mechanism the framework also provides two ways of adding transaction management to applications:Programmatically, by using Springs Transaction TemplateConfiguratively, by using metadata like XML or Java 5 annotationsTogether with Springs data access framework which integrates the transaction management framework it is possible to set up a transactional system through configuration without having to rely on JTA or EJB. The transactional framework also integrates with messaging and caching engines.The BoneCP Spring/Hibernate page contains a full example project of Spring used in conjunction with Hibernate.Model-view-controller framework The Spring Framework features its own MVC framework, which wasnt originally planned. The Spring developers decided to write their own web framework as a reaction to what they perceived as the poor design of the popular Jakarta Struts web framework, as well as deficiencies in other available frameworks. In particular, they felt there was insufficient separation between the presentation and request handling layers, and between the request handling layer and the model. Like Struts, Spring MVC is a request-based framework. The framework defines strategy interfaces for all of the responsibilities which must be handled by a modern request-based framework. The goal of each interface is to be simple and clear so that its easy for Spring MVC users to write their own implementations if they so choose. MVC paves the way for cleaner front end code. All interfaces are tightly coupled to the Servlet API. This tight coupling to the Servlet API is seen by some as a failure on the part of the Spring developers to offer a high-level abstraction for web-based applications citation needed. However, this coupling makes sure that the features of the Servlet API remain available to developers while offering a high abstraction framework to ease working with said API.The Dispatcher Servlet class is the front controller of the framework and is responsible for delegating control to the various interfaces during the execution phases of a HTTP request.The most important interfaces defined by Spring MVC, and their responsibilities, are listed below:Handler Mapping: selecting objects which handle incoming requests (handlers) based on any attribute or condition internal or external to those requestsHandler Adapter: execution of objects which handle incoming requestsController: comes between Model and View to manage incoming requests and redirect to proper response. It essentially is like a gate that directs the incoming information. It switches between going into model or view.View: responsible for returning a response to the client. It is possible to go straight to view without going to the model part. It is also possible to go through all three.View Resolver: selecting a View based on a logical name for the view (use is not strictly required)Handler Interceptor: interception of incoming requests comparable but not equal to Servlet filters (use is optional and not controlled by Dispatcher Servlet).Locale Resolver: resolving and optionally saving of the locale of an individual userMultipart Resolver: facilitate working with file uploa

温馨提示

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

评论

0/150

提交评论