Topic 1
Introducing Spring
When we think of the community of Java developers, we are reminded of the hordes of gold rush
prospectors of the late 1840s, frantically panning the rivers of North America looking for fragments of
gold. As Java developers, our rivers run rife with open source projects, but, like the prospectors, finding a
useful project can be time-consuming and arduous.
A common gripe with many open source Java projects is that they are conceived merely out of
the need to fill the gap in the implementation of the latest buzzword-heavy technology or pattern.
Having said that, many high-quality, usable projects meet and address a real need for real
applications, and during the course of this topic, you will meet a subset of these projects. You will get
to know one in particular rather well--Spring.
Throughout this topic, you will see many applications of different open source technologies, all
of which are unified under the Spring Framework. When working with Spring, an application
developer can use a large variety of open source tools, without needing to write reams of code and
without coupling his application too closely to any particular tool.
In this chapter, as its title implies, we introduce you to the Spring Framework, rather than looking at
any solid examples or explanations. If you are already familiar with the Spring project, then you might
want to skip this chapter and proceed straight to Chapter 2.
What Is Spring?
Perhaps one the hardest parts of actually explaining Spring as a technology is classifying exactly what it
is. Typically, Spring is described as a lightweight framework for building Java applications, but that
statement brings up two interesting points. First, you can use Spring to build any application in Java
(e.g., stand-alone, Web, JEE applications, etc.), unlike many other frameworks such as Apache Struts,
which is limited to web applications. Second, the lightweight part of the description doesn't really refer
to the number of classes or the size of the distribution, but rather, it defines the principle of the Spring
philosophy as a whole--that is, minimal impact. Spring is lightweight in the sense that you have to
make few, if any, changes to your application code to gain the benefits of the Spring core, and should
you choose to discontinue using Spring at any point, you will find doing so quite simple. Notice that we
qualified that last statement to refer to the Spring core only--many of the extra Spring components,
such as data access, require a much closer coupling to the Spring Framework. However, the benefits of
this coupling are quite clear, and throughout the topic we present techniques for minimizing the
impact this has on your application.
Search WWH :
Custom Search
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home