1、 1 Spring 2.0: Whats New and Why it Matters Themes Since the open source project began in February, 2003, the Spring Framework has gone from strength to strength. It has powered past 1 million downloads; become a de facto standard in a wide range of industries; and changed the development of enterpr
2、ise Java applications.Most important, it has developed a large and loyal user base, which understands its key values and has contributed feedback that has helped it to advance rapidly. Springs mission always been clear: To provide a non-invasive programming model. As far as possible, application cod
3、e should be decoupled from the framework. To provide a superior solution to in-house infrastructure, so that developers can focus on delivering business value rather than solving generic problems. To make developing enterprise applications as simple as possible, but enhancing, rather than sacrificin
4、g, power. Spring 2.0, which went final in October, 2006, further advances these values. As the core team looked at the development feature set coming together before the December 2005 Spring Experience Conference in Florida, we realized that two key themes - Simplicity and Power - stood out as a the
5、 common thread in Spring 2.0, and remained faithful to Springs beginnings. Some decisions were easy. From the outset, we were clear that Spring 2.0 was going to be fully backward compatible, or as near to fully backward compatible as possible. Especially given Springs position as a de facto standard
6、 in many enterprises, it was vital to avoid any disruption in user experience. Fortunately, because Spring has always gone to such pains to be non invasive, this goal was achievable. As work on Spring 2.0 progressed through 10 months of development, we also needed to take into account several trends
7、 that became evident in Spring usage in 2005-2006: Spring is increasingly used by very large organizations, who are adopting it strategically rather than project-by-project. This imposes not merely a level of responsibility regarding backward compatibility, but a set of challenges relating to a dema
8、nding class of users. An increasing number of prominent third party software products are using Spring internally, and need the optimum in configurability and flexibility from the container. Examples here are many. To choose just a few: The upcoming BEA WebLogic Server 10, which uses Spring and the
9、Pitchfork Project to perform injection and interception. BEA WebLogic Real Time (WLRT)-a high-end product from BEA targeted at applications such as front office trading, requiring low latency. Numerous widely used open source products such as Mule, ServiceMix and the Apache JetSpeed portal container
10、. Enterprise vendors integrating their products with Spring such as GigaSpaces, Terracotta 2 and Tangosol. Vendors in the grid space, in particular, are increasingly embracing Spring as the programming model of choice. Oracles SCA implementation and various other Oracle products. So we needed to ens
11、ure that while Spring become even better for developers of business applications, we also catered towards the needs of these demanding users. From 35,000 Feet Whats the big picture in Spring 2.0? Spring 2.0 provides a wide range of enhancements, of which the most visible are probably: Configuration
12、extensions: In Spring 2.0, Spring supports extensible XML configuration, enabling the development of custom elements that offer a new level of abstraction for generating Spring bean definitions. The XML extension mechanism also allows the provision of new tags to simplify many common tasks. Major en
13、hancements in the AOP framework, which make it both more powerful and easier to use. Enhanced support for Java 5. The ability for Spring beans to be implemented in dynamic languages, such as Groovy, JRuby and Beanshell, while retaining all the services of the Spring component model, such as Dependen
14、cy Injection, out of the box declarative services and AOP. Many new features including a Portlet MVC framework, message driven POJOs, integration with new APIs including the Java Persistence API (JPA) and an asynchronous task execution framework. A number of features below the surface are less evide
15、nt, but still important: Further IoC container extension points that make it easy to build frameworks or products on top of Spring. Improvements in Springs unique integration testing support. The provision of AspectJ aspects exposing core Spring functionality such as transaction management and Depen
16、dency Injection to users using both AspectJ and Spring. Importantly, these features are designed to work together in a harmonious whole. 3 Spring 2.0: 什么是新的和它为什么有关系 主 题 从 2003 年 2 月开源工程开始以来, Spring 框架已经变得越来越强大了。它已经给过去一百万下载提供动力;成为一个在大范围的工业个范围中实际的标准 ;并且改变企业 Java 语言应用的发展。最重要的是, 它已经发展了一个大和忠诚的,懂得它的重要价值和已
17、经帮助它迅速前进的反馈意见的用户基础 。 Spring 的任务总是清楚 : 提供一个非侵害的编程模型。 只要可能 ,在框架中应用代码是应该很少的。 向机构内部基础提供 上级解决方案, 因此开发者能关注商业价值不是解决普通的问题。 使开发企业应用程序变得尽可能简单,是增强而不是削弱开发力量。 Spring 2.0 在 2006 年 10 月中变为发展成熟,进一步完善了这些价值。 作为核心团队,在 2005年 12月在佛罗里达州举行的 Spring经验交流之前 看着这个发展特征装置集合到一起的时候,我们意识到两个关键主题 -简单和功能强大 -在 Spring 2.0 中 是杰出的共用线 ,并且对于
18、 Spring 的起点是保留可靠的。 一些决定是很容易的。 从一开始,我们很清楚 Spring 2.0 是完全向后兼容的,或者尽可能向后兼容靠近完全。尤其是给 Spring 的是一个在很多企业中实际的标准的地位,它是充满活力的致使避免任何在用户经验中的破坏。 幸运地 , 因为 Spring 总是这样苦心反对入侵的 ,所以这个目标是 完成的 。 当通过 10 个月的发展在 Spring2.0 上工作取得进展时 , 我们应该考虑一些趋势,这些趋势 在 2005-2006 年中在 Spring 使用中变得明显 : Spring 被非常大组织日益应用 ,这些组织是在战略上使用它而不是通过项目来使用它。
19、这不只强加一个关于向后 的兼容性的职责程度 ,而 是一系列挑战与一个 要求的用户的课程 有关 。 一个显着第三方软件产品在内部使用 Spring 的数字逐渐增加 , 并且需要最宜 的 可配置性和 自容器的灵活性 。这里有很多例子。只是选择了其中的一小部分: 即将来临的 BEA WebLogic 服务器 10, 使用 Spring 和干草叉项目进行注入和拦截。 BEA WebLogic 实时 (WLRT)一种 从 BEA 被瞄准在应用譬如行政管理部门贸易 , 要求低潜在因素高端产品。 众多的广泛被应用的开放来源产品譬如 Mule、 ServiceMix 和 the Apache JetSpeed portal 容器。 企业 厂商用 Spring 集成他们的产品譬如 GigaSpaces、 Terracotta 和 Tangosol 。 特别是 , 在 这一行业的 厂商们 越来越接受 Spring 作为编程模型的选择。 Oracles SCA 实施和各种各样的 Oracle 产品 因此我们需要确定,当 Spring 为商业应用开发商变成更好的时候 ,我们也向这些要求多的使用者的需要提供满足了。