If you've been forced to learn Spring in your new job, or you're worried about losing your legacy development role and you know you've got to get caught up on the Java industry's most popular IoC container, you've probably got a copy of Craig Walls' Spring in Action floating around your home or office. In his latest posting at SpringSource.com, Craig takes some time to provide a quick but thorough introduction to Spring Social, "a new extension to Spring that aims to provide a platform upon which social-ready Spring applications may be built."
When it comes to promising social networking facilities, the Java community has spent too much time writing checks that the available software simply couldn't cash. In sales pitches and seminars, long before Zuckerman even attended college, managers and business users were being promised Facebook like experiences, yet even the most advanced portals at the time tended to fall significantly short of what we have come to expect from social networking sites today. Certainly the latest portal releases from WebSphere and Liferay have demonstrated that the enterprise Java community has caught up, but those organizations not hosting their applications on modern portal servers still find integrating social networking features into their sites to be a challenge.
Spring Social promises to make interacting with and integrating social networking functions into existing applications much simpler, while obfuscating some of the complexity associated with OAuth secured interactions.Just like the Spring JdbcTemplate helps simplify database interactions, Spring social templates are promising to make interacting with Twitter and Facebook easier as well.
"A key component of Spring Social is its collection of social templates. These templates (which leverage RestTemplate under the covers) expose operations of the service providers that they model, handling the intricacies of adding OAuth Authorization headers for you.Spring Social 1.0.0.M1 includes 4 social templates to choose from:
To use any of these templates, simply create an instance of it, providing the OAuth connection details through constructor arguments. For example, to create an instance of TwitterTemplate:"
It's an interesting project; certainly worth taking a look at if integrating social networking features into your applications is one of your current goals.
The Full Article