Forum: Ruby on Rails Model based on remote Web Services instead of DB

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
F47d3f13be1de34b1607c98b0e7da999?d=identicon&s=25 murtada (Guest)
on 2007-06-16 07:58
(Received via mailing list)

I am accessing a web service that sends me a list of events. My local
ROR application is an events website.

What is the best way to integrate these? If I were to have a local DB,
I would just create a model, controller etc. Is it possible to keep
such a structure, and just have the model retrieve data from the web
service instead of the local DB?


588ab1c0a5610a7e160a3b101abb91e6?d=identicon&s=25 MichaelLatta (Guest)
on 2007-06-16 09:44
(Received via mailing list)
There is nothing in controllers and views that assumes active record
for the model, and the model knows nothing about the other 2.  That is
what separation of concerns is all about.  You can build model classes
any way you like.  The classes should provide some form of class level
methods the controller can use to get started servicing a request.  It
may or may not return instances of the "model" class, or just data in
other forms like hashes and such.

This topic is locked and can not be replied to.