#翻译NO.1# --- Spring Integration Framework

本文详细介绍了SpringIntegration框架,它基于Spring框架扩展了面向消息的编程模式,支持轻量级消息传递、集成外部系统以及消息驱动架构。文章强调了SpringIntegration在实现复杂企业解决方案、支持异步消息驱动行为以及促进现有Spring用户采用方面的优势。同时,文章概述了其设计原则,如组件解耦、业务逻辑与集成逻辑分离、以及促进重用和可移植性的扩展点设计。

Part II. Overview of Spring Integration Framework

Spring Integration provides an extension of the Spring programming model to support the well-known Enterprise Integration Patterns. It enables lightweight messaging within Spring-based applications and supports integration with external systems via declarative adapters. Those adapters provide a higher-level of abstraction over Spring's support for remoting, messaging, and scheduling. Spring Integration's primary goal is to provide a simple model for building enterprise integration solutions while maintaining the separation of concerns that is essential for producing maintainable, testable code.

(PS:Spring Integration框架针对总所周知企业集成模式提供了面向Spring开发模式的解决途径, 他支持基于Spring容器配置轻量级的消息传输以及用过内部提供的多种适配器与外部多个异构的系统进行接入以及通信, 这些适配器是基于Spring容器的高度抽象的组件,涵盖远程调用、消息传输以及任务调度等。Spring Integration的首要 目标是通过简单的对象从而实现企业集成的解决方案,并且该框架聚焦于分离点以及提供良好的维护性与测试性)

2. Spring Integration Overview

2.1 Background

One of the key themes of the Spring Framework is inversion of control. In its broadest sense, this means that the framework handles responsibilities on behalf of the components that are managed within its context. The components themselves are simplified since they are relieved of those responsibilities. For example, dependency injection relieves the components of the responsibility of locating or creating their dependencies. Likewise, aspect-oriented programming relieves business components of generic cross-cutting concerns by modularizing them into reusable aspects. In each case, the end result is a system that is easier to test, understand, maintain, and extend.

(PS:Spring Framework一个显著的特征就是“控制反转”,从字面上理解,框架具有管理并且向外界提供这些组件的功能, ,每个组件仅仅需要关注自己的业务逻辑实现即可,通过依赖注入实现了组件之间的解耦以及相互的依赖关系, 同样,面向切面编程,通过该途径可以统一管理组件的横向特性,使其模块更加具有重用性。总之一句话,这些特性使得 系统更加容易理解、测试、维护与扩展)

Furthermore, the Spring framework and portfolio provide a comprehensive programming model for building enterprise applications. Developers benefit from the consistency of this model and especially the fact that it is based upon well-established best practices such as programming to interfaces and favoring composition over inheritance. Spring's simplified abstractions and powerful support libraries boost developer productivity while simultaneously increasing the level of testability and portability.

(PS:此外,通过spring框架去构建企业级的应用程序,作为开发人员,要习惯这种模式并且从中获取更好的开发实践,例如 面向接口的模式便于组合,而不仅仅是继承。Spring家族提供了强大而抽象的底层支撑,这样可以使得开发人员提高开发效率。)

Spring Integration is motivated by these same goals and principles. It extends the Spring programming model into the messaging domain and builds upon Spring's existing enterprise integration support to provide an even higher level of abstraction. It supports message-driven architectures where inversion of control applies to runtime concerns, such as when certain business logic should execute and where the response should be sent. It supports routing and transformation of messages so that different transports and different data formats can be integrated without impacting testability. In other words, the messaging and integration concerns are handled by the framework, so business components are further isolated from the infrastructure and developers are relieved of complex integration responsibilities.

(PS:Spring Integration开发的目标与原则也是遵循上述特性的,他对Spring框架已有消息模型进一步扩展与补充, 并且整个框架体系基于Spring框架开发,并且提供更好的抽象。他支持基于反转控制模式下的消息驱动的实时场景, 例如,什么时候该执行指定的业务逻辑以及什么时候获取发送的响应。同事他还支持消息路由以及实时协议转换, 换句话说:消息发送以及如何集成是该框架所关注的,这样进一步使得业务逻辑分离,从而降低系统的耦合性。)

As an extension of the Spring programming model, Spring Integration provides a wide variety of configuration options including annotations, XML with namespace support, XML with generic "bean" elements, and of course direct usage of the underlying API. That API is based upon well-defined strategy interfaces and non-invasive, delegating adapters. Spring Integration's design is inspired by the recognition of a strong affinity between common patterns within Spring and the well-known Enterprise Integration Patterns as described in the book of the same name by Gregor Hohpe and Bobby Woolf (Addison Wesley, 2004). Developers who have read that book should be immediately comfortable with the Spring Integration concepts and terminology.

(PS:作为基于Spring编程模式的补充,Spring Integration提供了大量的注解以及Xml命名空间的支持,通过配置为标准 的Spring Bean组件,通过接口模式访问其业务方法。这些API都是面向接口并且都是非侵入式、委托适配器。 该框架的设计灵感来自于企业集成模式以及普通模式的广泛性。 )

2.2 Goals and Principles

Spring Integration is motivated by the following goals:

  • Provide a simple model for implementing complex enterprise integration solutions.(提供解决复杂的企业集成的一个简单的解决措施)

  • Facilitate asynchronous, message-driven behavior within a Spring-based application.(基于Spring框架的 异步的、消息驱动的解决方案)

  • Promote intuitive, incremental adoption for existing Spring users.(更好的与Spring框架集成,提供基于Spring开发的便利)


Spring Integration is guided by the following principles:

  • Components should be loosely coupled for modularity and testability.(组件解耦使其模块化以及可测试化)

  • The framework should enforce separation of concerns between business logic and integration logic.(框架强制分离集成逻辑 与 业务逻辑)

  • Extension points should be abstract in nature but within well-defined boundaries to promote reuse and portability.(扩展点的抽象设计使其更加便于重用以及可移植性)

   


转载于:https://my.oschina.net/qfhxj/blog/95259

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值