Northern Virginia Software Symposium
November 4 - 6, 2011 - Reston, VA
View the event details here ».
NoXML: Spring for XML-Haters
In this presentation, we'll explore all of the ways to do bean wiring in Spring We'll take a pragmatic view of each style, evaluating their strengths, weaknesses, and applicability to varying circumstances.
Over 6 years ago, Spring entered the enterprise Java scene, bringing a simpler development model rooted in dependency injection, the notion of assembling application components in a loosely-coupled way. With it, however, came a flood of XML configuration, required to declare how those components were to be assembled.
For a variety of reasons, XML has fallen out of favor with much of the development community. Now that there are other frameworks that offer dependency injection without all of the XML, some are suggesting that Spring's heavy use of XML has it destined for the scrap heap.
They don't know Spring.
Although XML-based Spring configuration is still available and still has a place in many Spring applications, it is no longer the only way to do dependency injection in Spring. The past few releases of Spring have brought us new ways of assembling our application objects, including annotation-driven options such as Spring's @Autowired and JSR-330's @Inject and Java-based configuration with Spring JavaConfig. There's even a way to express Spring configuration in Groovy.
About Craig Walls
Craig Walls is a senior engineer with SpringSource as the Spring Social project lead and is the author of Spring in Action and XDoclet in Action (both published by Manning) and Modular Java (published by Pragmatic Bookshelf). He's a zealous promoter of the Spring Framework, speaking frequently at local user groups and conferences and writing about Spring and OSGi on his blog. When he's not slinging code, Craig spends as much time as he can with his wife, two daughters, 2 birds and 3 dogs.More About Craig »