I am new to the Ruby on Rails thing, and while I like the organization and standards provided, I am a little confused on how to make rails work for me in this specific case.
I have a Webservice that I want to use my rails application with. Making a direct connection to the database would be nice and provide me instantly with the models I need to make my Rails application work.
However, I would have to replicate all of the logic provided by the webservice(which isn't trivial). If I didn't make a direct connection to the database, how would I persist the models(such as a user model).
Would I have to make a separate database that mimics the server's DB but never actually interacts with it directly?
Thanks in advance -- let me know if you need clarification.
EDIT: Example
- I have a rails app that gets on URL www.mywebservice:8080.com/users/5
- Service returns JSON {name:foo,nick:bar,friend:baz}
- At this point how do I tell rails to make a User object out of what it just got and then store it in the database? Or do is there a way to persist this JSON object?