开发者

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

开发者 https://www.devze.com 2023-01-19 08:07 出处:网络
In my rails application I use some external web services: 开发者_如何学JAVAtwitter, google picasa, flickr etc.

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

精彩评论

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