Spring for the Angle-Bracket Averse: Developing Spring Applications with Absolutely No XML
In this session, we'll explore ways of configuring Spring without involving XML. We'll start with an examination of JRuby and Groovy configuration mechanisms and then dig into Spring JavaConfig and see how to wire an entire Spring application together using annotations instead of XML.
One of the most prevalent myths about Spring is that Spring requires heavy use of XML. While it is true that XML is the conventional option for configuring a Spring application context, it is not the only option. Non-XML alternatives exist, including scripting configuration with JRuby or Groovy and annotation-based configuration with Spring JavaConfig.
What's especially interesting about these non-XML alternatives is that aside from freeing developers from the "tyranny" of angle-brackets, they also open up opportunities for dynamically configured Spring contexts that take advantage of language constructs not available in XML, such as looping and conditional execution. Moreover, concerns about XML's static identifiers and lack of refactorability are non-issues when configuring Spring in a richer language such as Java.
About Craig Walls
Craig Walls has been professionally developing software for over 17 years (and longer than that for the pure geekiness of it). He 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, 4 birds and 3 dogs.
More About Craig »