Thursday, March 27, 2008

Five Things to Like About Spring ... Even if You Don't Use It Directly

A while back (May 2005), Bruce Tate's article Five Things I Love About Spring was published. As one would expect, this article focused on things that the Spring Framework does for developers using Spring. There are numerous other articles on the subject and perhaps no better source on the architectural justification for and advantages of using Spring exists than the "book that started it all" (J2EE Design and Development).

In this blog entry, I briefly look at five things that the Spring framework has done or can do for Java developers who don't directly use the Spring Framework in their applications.

1. Spring prompted J2EE to become much more usable as Java EE 5.

While many Java EE developers use Spring in one way or another, some still develop with Java EE without Spring. These users still benefit from Spring because Spring's presence has helped motivate change to Java EE, particularly in terms of increased usability.

2. Spring inspired many of the Java EE 5 advancements such as dependency injection and POJO-based development.

Not only did Spring motivate improvements to Java EE, but Spring also provided examples of techniques and approaches that enterprise developers like that Java EE could emulate. Some of these approaches were even around before Spring, but Spring popularized them as the framework itself rapidly rose in popularity.

3. Spring with Dependencies makes many useful libraries and frameworks available in a single download.

More than once, I have benefited from having a necessary open source product or library readily available from the Spring dependencies directory. This may seem like a minor thing, but it saves me a little time and potentially a lot of aggravation from having to find the appropriate web site to download the appropriate files and then unload the files. This effort is not a big deal in most cases, but there are times when I just want to try something out that I have read very quickly and the time saved from having to download it is greater than the time I spend trying it out. Spring's bundling of these dependencies can be a little reassuring regarding compatibilities and versions of the dependencies.

4. Spring developers help identify useful open source libraries and frameworks.

Related to the point above, I have learned about interesting of promising libraries and open source products simply by browsing the list of Spring dependencies. The Spring developers seem to pick the best of the compatible open source software and so, in many respects, have done research into these products that I can now take advantage of.

5. Spring provides developers with examples of design and Java coding best practices.

The Spring Framework probably shows more flexibility and extensibility than many of us need because of its nature as a common framework. That being said, we all still want a certain degree of flexibility and extensibility in our applications and Spring provides many good examples of how to achieve this. Note that I am not talking about Spring best practices here, but am rather talking about Java best practices that the Spring framework enables, encourages, and/or provides examples for. Because Spring is open source, we can view and get ideas from its code base.

No comments: