views:

128

answers:

2

I am planning to write some new UI code and many people suggested to use RoR. But from what I have read about RoR so far, it seems to be almost mandatory to have a database to store the backend data. In my case, I do not have access to a database and all my data objects are available through web services (some REST and SOAP services).

I think I have to use the controller to directly talk to the services in this case, but is it still a good idea to use RoR without the model layer (ActiveRecord).

Are there any other frameworks more suited for this kind of approach (I can use anything in Java or Ruby, we do not have any PHP or Python code).

+2  A: 

Rails will work just fine for this; it explicitly supports running without ActiveRecord. See the comment in the default environment.rb file:

# Skip frameworks you're not going to use. To use Rails without a database
# you must remove the Active Record framework.
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]

Your database.yml file will be ignored if you don't load ActiveRecord; all of your models can inherit from ActiveResource::Base and will work just fine.

Jim Puls
So I can have the validations also setup this way?
Arvind
Wouldn't they be on the other end of the service call? And if they're not, couldn't you just override the save method?
Jim Puls
A: 

If web services is all you do, then I would recommend sinatra. Sinatra makes applications that work on web services a breeze. If you would like a similar approach on the client with fragment URLs, check out sammy. They are both awesome for building web applications which have non-traditional data sources.

Vagmi Mudumbai