当前位置:文档之家› 软件工程专业外文翻译

软件工程专业外文翻译

软件工程专业外文翻译
软件工程专业外文翻译

英文原文

SSH is Spring + struts + Hibernate an integration framework, is one of the more popular a Web application framework.

Spring

Light weight -- from two aspects in terms of size and cost of the Spring are lightweight.A complete Spring framework can in one size only 1MB multiple JAR files released.And Spring required processing overhead is not worth mentioning.

Inversion of control -- Spring through a known as inversion of control (IoC) technology promotes loose coupling.When using IoC, an object depend on other objects will be passed in through passive way, but not the object of its own to create or find a dependent object.You can think of IoC and JNDI instead -- not the object from the container for dependent, but in different container object is initialized object request on own initiative will rely on to it.

Aspect oriented programming -- Spring provides rich support, allowed by separating the application's business logic and system level service cohesion

development.Application object only realize they should do -- complete business logic.They are not responsible for other system level concerns.

Container -- Spring contains and management application object configuration and life cycle, in this sense, it is a kind of container, you can configure each of your bean to be created -- Based on a reconfigurable prototype (prototype), your bean can create a single instance or every time when they are needed to generate a new examples -- and how they are interrelated.However, Spring should not be confused with the traditional heavyweight EJB container, they are often large and unwieldy, difficult to use.

Struts

Struts on Model, View and Controller are provided with the corresponding components.

ActionServlet, this is Struts core controller, responsible for intercepting the request from the user.

Action, this class is typically provided by the user, the controller receives from the ActionServlet request, and according to the request to call the model business logic method to processing the request, and the results will be returned to the JSP page display.

Part Model

By ActionForm and JavaBean, where ActionForm used to package the user the request parameters, packaged into a ActionForm object, the object to be forwarded to the Action ActionServlet Action ActionFrom, according to which the request parameters processing a user request.

JavaBean encapsulates the underlying business logic, including database access.

Part View

This section is implemented by JSP.

Struts provides a rich library of tags, tag library can be reduced through the use of the script, a custom tag library can be achieved with Model effective interaction, and increased practical function.

The Controller component

The Controller component is composed of two parts -- the core of the system controller, the business logic controller.

System core controller, the corresponding ActionServlet.The controller is provided with the Struts framework, HttpServlet class inheritance, so it can be configured to mark Servlet.The controller is responsible for all HTTP requests, and then according to the user request to decide whether or not to transfer to business logic controller.

Business logic controller, responsible for processing a user request, itself does not have the processing power, it calls the Model to complete the deal.The corresponding Action part.

Hibernate

Hibernate is an open source object relation mapping framework, it had a very lightweight JDBC object package, makes Java programmers can use arbitrary objects to manipulate database programming thinking.Hibernate can be applied in any use of JDBC occasions, can be in the Java client program to use, also can be in Servlet / JSP Web applications, the most revolutionary, Hibernate can be applied in the EJB J2EE schema to replace CMP, complete data persistence.

The core of Hibernate interface has a total of 5, are: Session, SessionFactory, Query, Transaction and Configuration.The 5 core interface in any development will be used in.Through these interfaces, not only can the persistent object access, but also to carry out a transaction control.

中文翻译

SSH 为spring+ struts+ hibernate的一个集成框架,是目前较流行的一种Web 应用程序开源框架。

Spring

轻量——从大小与开销两方面而言Spring都是轻量的。完整的Spring框架可以在一个大小只有1MB多的JAR文件里发布。并且Spring所需的处理开销也是微不足道的。

控制反转——Spring通过一种称作控制反转(IoC)的技术促进了松耦合。当应用了IoC,一个对象依赖的其它对象会通过被动的方式传递进来,而不是这个对象自己创建或者查找依赖对象。你可以认为IoC与JNDI相反——不是对象从容器中查找依赖,而是容器在对象初始化时不等对象请求就主动将依赖传递给它。

面向切面——Spring提供了面向切面编程的丰富支持,允许通过分离应用的业务逻辑与系统级服务进行内聚性的开发。应用对象只实现它们应该做的——完成业务逻辑。它们并不负责其它的系统级关注点。

容器——Spring包含并管理应用对象的配置和生命周期,在这个意义上它是一种容器,你可以配置你的每个bean如何被创建——基于一个可配置原型(prototype),你的bean可以创建一个单独的实例或者每次需要时都生成一个新的实例——以及它们是如何相互关联的。然而,Spring不应该被混同于传统的重量级的EJB容器,它们经常是庞大与笨重的,难以使用。

Struts

struts对Model,View和Controller都提供了对应的组件。

ActionServlet,这个类是Struts的核心控制器,负责拦截来自用户的请求。

Action,这个类通常由用户提供,该控制器负责接收来自ActionServlet的请求,并根据该请求调用模型的业务逻辑方法处理请求,并将处理结果返回给JSP页面显示。

Model部分

由ActionForm和JavaBean组成,其中ActionForm用于封装用户的请求参数,封装成ActionForm对象,该对象被ActionServlet转发给Action,Action 根据ActionFrom里面的请求参数处理用户的请求。

JavaBean则封装了底层的业务逻辑,包括数据库访问等。

View部分

该部分采用JSP实现。

Struts提供了丰富的标签库,通过标签库可以减少脚本的使用,自定义的标签库可以实现与Model的有效交互,并增加了现实功能。

Controller组件

Controller组件有两个部分组成——系统核心控制器,业务逻辑控制器。

系统核心控制器,对应ActionServlet。该控制器由Struts框架提供,继承HttpServlet类,因此可以配置成标注的Servlet。该控制器负责拦截所有的HTTP 请求,然后根据用户请求决定是否要转给业务逻辑控制器。

业务逻辑控制器,负责处理用户请求,本身不具备处理能力,而是调用Model 来完成处理。对应Action部分。

Hibernate

Hibernate是一个开放源代码的对象关系映射框架,它对JDBC进行了非常轻量级的对象封装,使得Java程序员可以随心所欲的使用对象编程思维来操纵数据库。Hibernate可以应用在任何使用JDBC的场合,既可以在Java的客户端程序使用,也可以在Servlet/JSP的Web应用中使用,最具革命意义的是,Hibernate可以在应用EJB的J2EE架构中取代CMP,完成数据持久化的重任。Hibernate的核心接口一共有5个,分别为:Session、SessionFactory、Query、Transaction和Configuration。这5个核心接口在任何开发中都会用到。通过这些接口,不仅可以对持久化对象进行存取,还能够进行事务控制。

相关主题
文本预览
相关文档 最新文档