Spring Social 1.0 Connects Java Apps to Facebook, Twitter, GitHub, More
Earlier this month a new extension of the Spring Framework, the Spring Social Framework, was officially released. Spring Social is designed to let developers connect Java applications to SaaS APIs from Twitter, Facebook, LinkedIn, GitHub and others, and to interact with those services on behalf of their users.
In a nutshell, this is an extensible service provider framework to simplify connecting local user accounts to hosted provider accounts. It comes with a connect controller that handles the authorization flow among a Java/Spring Web application, a service provider and the end users. It includes Java bindings to popular service provider APIs (Facebook, Twitter, etc.). And it provides a sign-in controller that enable users to authenticate with via the connected application by signing in through a service provider.
The 1.0 release is a big one; it includes fixes for all bugs since Release Candidate 3. It requires Spring Framework 3.0.5 or greater, and the SpringSource.org community is recommending Spring 3.1 for new applications that need to take advantage of the latest advances in the core framework.
"Spring Social offers Java-based APIs bound to service provider REST APIs," explained Senior SpringSource Engineer and project promoter Craig Walls on the Spring Social team blog. "This not only enables you to interact with a provider API in Java terms, but also makes sure that each request to the REST API carries the access token and signature. Spring Social provides complete API bindings for both Facebook and Twitter, and there are also API bindings started for other providers such as LinkedIn, TripIt, GitHub and Gowalla."
Walls, along with SpringSource Principal and Founding Partner Keith Donald and SpringSource Senior Software Engineer Roy Clarkson, developed the Greenhouse reference implementation, which yielded three reusable components that evolved into the Spring Social, Spring Mobile and Spring Android projects.
The Social Spring project currently provides seven sample applications, each illustrating different features and use cases. Spring Social Movies, for example demonstrates how to create a new service provider implementation and API binding for interacting with the NetFlix REST API. Spring Social Twitter4j shows how to create a new service provider implementation that leverages an existing Java API binding, specifically, a new Twitter service provider that uses Twitter4J as the API binding.
The Spring Social project has been attracting a growing community, the members of which are already authoring extensions of their own. The current list of independent code contributions includes, among others: Matt Wright's Spring Social Instagram and Spring Social Foursquare, Morton Andersen-Gott's Spring Social Yammer , Gabriel Axel's Spring Social Google, Marc Schipperheyn's JPA-Based Connection Repository, Stefan Fussenegger's security module for Spring Social and SynergJ's Spring Social Plugin for Grails.
In his September 8 blog post, Walls offered his wish list for the next release: "Now that we have a strong, stable foundation, I'm looking forward to seeing where Spring Social goes from here," he wrote. "I'd love to see streaming support for the Twitter and Facebook API bindings, user management capabilities, an invitation system, enhanced OAuth provider support, tighter Spring Security integration and more."
John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS. He can be reached at [email protected].