<para>Fundamentally, what is Spring? We think of it as a Platform for your
<para>Spring Framework is a Java platform that provides comprehensive
Java code. It provides comprehensive infrastructural support for developing
infrastructure support for developing Java applications. Spring handles the
Java applications. Spring deals with the plumbing so you can focus on
infrastructure so you can focus on your application.<!--First text mention should be *Spring Framework* not just *Spring*. I revised next sentence because *plumbing* is idiomatic and --><!--*the domain problem* is an unclear reference. Isn't the point that Spring takes care of *under the covers* so you can focus on app? TR: OK.--></para>
solving the domain problem</para>
<para>Spring as a platform allows applications to be built from “plain old
<para>Spring enables you to build applications from “plain old Java objects”
Java objects” (POJOs). This is true for the Java SE programming model as
(POJOs) and to apply enterprise services non-invasively to POJOs. This
well as within a number of other environments including full and partial
capability applies to the Java SE programming model and to full and partial
Java EE. Spring allows enterprise services to be applied to POJOs in a
Java EE.</para>
non-invasive way</para>
<para>Examples of Spring as a platform:</para>
<para>Examples of how you, as an application developer, can use the Spring
platform advantage:<!--In each of the examples, clarify what you mean by *the implementer* (identify it, or is it a person?). ALSO in each sentence replace--><!--*dealing with* APIs with what you mean: what does not have to be done in regard to APIs? IMPORTANT, because this discusses advantage--><!--of product. TR: REVISED, PLS REVIEW. I changed *implementer* to *application developer* and put it upfront rather than repeat it.--></para>
<itemizedlist>
<itemizedlist>
<listitem>
<listitem>
<para>Make a Java method execute in a database transaction; without the
<para>Make a Java method execute in a database transaction without
implementer dealing with transaction APIs</para>
having to deal with transaction APIs.</para>
</listitem>
</listitem>
<listitem>
<listitem>
<para>Make a local Java method a remote-procedure; without the
<para>Make a local Java method a remote procedure without having to deal
implementer dealing with remoting APIs</para>
with remote APIs.</para>
</listitem>
</listitem>
<listitem>
<listitem>
<para>Make a local Java method a management operation; without the
<para>Make a local Java method a management operation without having to
implementer dealing with JMX APIs</para>
deal with JMX APIs.</para>
</listitem>
</listitem>
<listitem>
<listitem>
<para>Make a local Java method a message handler; without the
<para>Make a local Java method a message handler without having to deal
implementer dealing with JMS APIs</para>
with JMS APIs.</para>
</listitem>
</listitem>
</itemizedlist>
</itemizedlist>
<sectionid="overview-dependency-injection">
<sectionid="overview-dependency-injection">
<title>Dependency Injection</title>
<title>Dependency Injection and Inversion of Control</title>
<sidebarid="background-ioc">
<sidebarid="background-ioc">
<title>Background</title>
<title>Background</title>
<para>In early 2004, Martin Fowler asked the readers of his site: when
<para><quote><emphasis>The question is, what aspect of control are
talking about Inversion of Control: <quote><emphasis>the question is,
[they] inverting?</emphasis></quote> Martin Fowler posed this question
what aspect of control are [they] inverting?</emphasis></quote>. Fowler
about Inversion of Control on his site in 2004. Fowler suggested
then suggested renaming the principle (or at least giving it a more
renaming the principle to make it more self-explanatory and came up with
self-explanatory name), and started to use the term
<para>The Spring Framework IoC component addresses this concern by
<firstterm>Decorator</firstterm>, and <firstterm>Service
providing a formalized means of composing disparate components into a
Locator</firstterm> (to name but a few) have widespread recognition and
fully working application ready for use. <!--Preceding sentence sounds like a description of what patterns do (and Spring uses patterns). Distinguish from patterns.-->The
acceptance within the software development industry (presumably that is
Spring Framework codifies formalized design patterns as first-class
why these patterns have been formalized as patterns in the first place).
objects that you can integrate into your own application(s). <!--Preceding sentence suggests that you already have the application and *then* you integrate design patterns into it. Again, I--><!--don't see a major distinction here from use of patterns (as described in earlier paragraph) and use of IoC component to build apps.
This is all very well, but these patterns are just that: best practices
given a name, typically together with a description of what the pattern
TR: This section doesn't read well and I think we should try to rewrite it.-->Numerous
does, where the pattern is typically best applied, the problems that the
organizations and institutions use the Spring Framework in this manner to
application of the pattern addresses, and so forth. Notice that the last
implementation for web-applications. Spring's MVC framework is not just
implementation for web applications. Spring's MVC framework provides a
any old implementation; it provides a <emphasis>clean</emphasis>
<emphasis>clean</emphasis> separation between domain model code and web
separation between domain model code and web forms, and allows you to
forms, and integrates with all the other features of the Spring
use all the other features of the Spring Framework.</para>
Framework.<!--MVC allows you to use *all other features*? (Or just all other features in Web layer?) How do you mean? Does this need elaboration?
It sounds important.--><!--TR: REVISED, PLS REVIEW.--></para>
<para>The <emphasis>Web-Portlet</emphasis> module provides the MVC
<para>The <emphasis>Web-Portlet</emphasis> module provides the MVC
implementation to be used in a portlet environment and mirrors what is
implementation to be used in a portlet environment and mirrors the
provided in the Web-Servlet module.</para>
functionality of Web-Servlet module.<!--mirrors it in what way?--><!--TR: REVISED, PLS REVIEW. The functionality is mirrored - one for Servlets and the other for Portlets--></para>
provides an <emphasis>AOP Alliance</emphasis>-compliant aspect-oriented
provides an <emphasis>AOP Alliance</emphasis>-compliant aspect-oriented
programming implementation allowing you to define, for example,
programming implementation allowing you to define, for example,
method-interceptors and pointcuts to cleanly decouple code implementing
method-interceptors and pointcuts to cleanly decouple code that
functionality that should logically speaking be separated. Using
implements functionality that should be separated. Using source-level
source-level metadata functionality you can also incorporate all kinds
metadata functionality, you can also incorporate behavioral information
of behavioral information into your code, in a manner similar to that of
into your code, in a manner similar to that of .NET attributes.</para>
.NET attributes.</para>
<para>The separate <emphasis>Aspects</emphasis> module provides
integration with AspectJ.<!--Aspects module not shown in diagram, add it to that. Also, why is this line under AOP and Instrumentation if it's separate?
<para>There is also a separate <emphasis>Aspects</emphasis> module that
TR: OK. Added to diagram.--></para>
provides integration with AspectJ.</para>
<para>The <emphasis>Instrumentation</emphasis> module provides class
<para>The <emphasis>Instrumentation</emphasis> module provides class
instrumentation support and classloader implementations to be used in
instrumentation support and classloader implementations to be used in
@ -260,21 +233,21 @@
<section>
<section>
<title>Test</title>
<title>Test</title>
<para>The <emphasis>Test</emphasis> module contains the Test Framework
<para>The <emphasis>Test</emphasis> module supports the testing of
that supports testing Spring components using JUnit or TestNG. It
Spring components with JUnit or TestNG. It provides consistent loading
provides consistent loading of Spring ApplicationContexts and caching of
of Spring ApplicationContexts and caching of those contexts. It also
those contexts. It also contains a number of Mock objects that are usful
provides mock objects that you can use to test your code in
in many testing scenarios to test your code in isolation.</para>
isolation.</para>
</section>
</section>
</section>
</section>
<sectionid="overview-usagescenarios">
<sectionid="overview-usagescenarios">
<title>Usage scenarios</title>
<title>Usage scenarios</title>
<para>With the building blocks described above you can use Spring in all
<para>The building blocks described previously make Spring a logical
sorts of scenarios, from applets up to fully-fledged enterprise
choice in many scenarios, from applets to full-fledged enterprise
applications using Spring's transaction management functionality and web
applications that use Spring's transaction management functionality and