Spring (Framework)

The Spring Framework ( Spring short ) is an open source framework for the Java platform. The aim of the Spring framework is to simplify the development of Java / Java EE and promote good programming practices. Spring offers a wide range of functionality an integrated solution for developing applications and their business logic; there is a decoupling of application components in the foreground.

Properties

The framework is based on the featured in Rod Johnson's book Expert One-On -One J2EE Design and Development principles:

  • Dependency Injection: The objects are allocated the necessary resources and objects. You do not have to search yourself.
  • Aspect-oriented programming ( AOP): This allows the programmer to isolate mainly technical aspects such as transactions or security and keep the actual program code free from it. Spring brings this next Spring AOP good support for AspectJ pointcut expression language and its with.
  • Templates are used to simplify the work with some programming interfaces ( APIs ) by resources cleaned up automatically and error situations are handled uniformly.

Thus, a POJO -based programming model is possible in which the POJOs in addition in different environments can be run (on a server or a client application ).

Extensions

Based on the Spring framework further projects, which are developed within the Spring project exist:

The now not discontinued open source project Spring Modules also offers a number of tools and extensions for Spring, including, for example integration with Ant, Flux, HiveMind, Lucene, Apache OJB, Tapestry, support for caching services, db4o, rules engines, various Jakarta Commons components, JavaSpaces, jBPM, extensions for Spring MVC and bean validation.

Comparison

Spring is in direct competition with other dependency injection frameworks such as Google Guice or PicoContainer, but offers due to its support for aspect -oriented programming and simplification of existing programming interfaces more than this.

Supports Compared to Enterprise JavaBeans 3.0, which is POJO based and dependency injection, there are the following differences:

  • EJB 3.0 supports dependency injection for JNDI objects or complex service objects, Spring, however, for all objects - even for POJOs with each other.
  • Springs dependency injection model is much more flexible. It offers several ways to intervene in the dependency injection process and supports a variety of different programming and configuration options.
  • EJB 3.0 supports the interceptors from the aspect-oriented programming only for beans. With the Spring AOP framework, however, it is always possible to integrate application-specific interceptors for each object.
  • Allows Spring to Spring Security to control access to the instance level access control with EJB 3.0 is role-based, however, different levels of access by users of the same roles are not so feasible.

At the same Spring supports many of the annotations of EJB 3.0, so that a similar programming model is possible.

History

Rod Johnson presented the idea to Spring for the first time in his book Expert One-On -One J2EE Design and Development (2002), and stood ready source as a companion. In February 2003 the source code was first made available on SourceForge as an open source project and was at that time the name of Spring framework. In June 2003, the first release appeared in version 0.9 under the Apache 2.0 license. The official 1.0 release of Spring was published in March 2004. Since that time, the Spring Framework was widely read in a few years and is already used in a variety of applications.

In September 2004, Version 1.1 was released with bug fixes and many new features. Published in May 2005 Version 1.2 already supported some Java 5 features while backward compatibility with older versions of Java. In December 2005, the Spring developers to version 2.0 was announced, which then brought a lot of new features are released, and was released in October 2006.

Up until the release of version 2.0 of the Spring Framework had been downloaded more than a million times and won in 2006 a JAX Innovation Award and a Jolt productivity award.

On 19 November 2007, Version 2.5 was released. Originally the development was provided as version 2.1, but due to the many new features, instead, the version 2.5 was the successor to the version 2.0.x. Spring 2.5 fully supports the Java 6 version and the Java EE in version 5 while backward compatible with Java 1.4 and Java EE 1.3. In addition, in Spring 2.5 Annotations for configuring the application components are supported.

In September 2009 SpringSource was acquired by VMware.

The current version is 3.x, version 3.0 was released on 16 December 2009. Were newly integrated with proposals for Expression Language, inter alia, for the configuration of Spring beans and a support for REST. In addition, the Java-based configuration from the Spring Java Config project in Spring 3.0 has been integrated. Is currently being developed at version 3.3. The main innovations are the portable cache abstraction and support for configuration profiles, which are generated depending on the environment different Spring beans. Furthermore, Web Conversations are introduced, with which condition can be managed, which must be available across multiple web pages.

The Spring Framework continues to be further developed by the Spring core developers, including Juergen Hoeller, Rod Johnson and Rob Harrop. The company SpringSource Division of VMware, formerly Interface21, employs the most active developer of the project and provides and others consulting, training and support to Spring.

Spring Dynamic Modules for OSGi Platform the (formerly Spring - OSGi )

Spring Dynamic Modules acting as a bridge between the Spring Framework and OSGi. Applications based on the Spring framework can thus be implemented with OSGi. The basic idea is the provision of Spring in the form of bundles. The dynamic features of the OSGi should be used.

Each bundle has its own application context. Spring beans may be offered as OSGi services, OSGi services are consumed as Spring beans. Services can be dynamically installed and uninstalled. The current release is Spring Dynamic Modules 1.1.2, which was released on 3 October 2008.

SpringSource dm Server

The use of OSGi for enterprise applications leads to some problems, since OSGi loading the classes handles differently. This can lead to incompatibilities and also more complex problems as, for example, an O / R mapper like Hibernate to modify the code of the persistent objects must. The SpringSource dm Server provides solutions to these problems and also facilitates the use of Spring. It is based on Apache Tomcat to support web applications and Equinox as the OSGi implementation. The SpringSource dm Server is an open source project to GNU General Public License ( GPL). Meanwhile, the sources are the basis for the Eclipse Virgo project, which is licensed under the Eclipse Public License.

742775
de