Pergunta

I'll soon start a new project in Grails in which I have to interact with Facebook and Twitter (and possibly myspace too).

I was wondering if someone already tried to do this through Spring Integration (2.0) adapters vs the new Spring Social APIs.

If you did, could you give me the pros and cons you've encountered with each of these ?

In Spring Integration, I've played with the twitter connector in a little example, and I found it quite easy. I liked the loose coupling. Spring social on the other hand seems to use templates that allow to do this easily too... hence my concerns about which framework to choose.

Thanks.

Philippe

Foi útil?

Solução

Spring Integration is best suited

  • if you have a sequence of steps, like a workflow
  • you have atleast a couple such flows
  • you want to separate your business logic from the orchestration logic (which step gets called when kind of stuff) in those flows

If all you need is simple connnectivity (for fire and forget messages) to twitter and the like, all you might need is spring social. Just adding Spring integration without a real need can lead to a system that is complicated to understand and maintain.

Outras dicas

The main advantages of using spring-social - at least as I perceive it - aren't the currently pretty weak implementations of APIs. It's more important to have a small framework that defines some foundations to build upon and integrates nicely into the rest of spring world (e.g. spring-security, which is what I'm trying right now).

As soon as other developers start adopting spring-social, various implementations of dozens of services will pop up - and all of them will easily fit into your application without much effort. And that will be just great.

However, it isn't worth the hazel if Facebook and Twitter clients are all you need. But you'll probably regret it whilst evaluating integrating Foursquare in a few weeks ;)

Spring Integration is mainly a back-end framework, so use that if you need to poll on the server. If all you need is web integration Spring Integration is not a good fit.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top