开发者

Where should I put external web service processing logic in Rails?

In my rails application I use some external web services: 开发者_如何学JAVAtwitter, google picasa, flickr etc.

Where should I put code related to processing responses of these services?


You can create abstract models (non-persistent) for each of these so each abstract model can be responsible for processing requests and so forth.

Data structure could look like this:

app/models/web_services/
  google.rb
  twitter.rb
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜