views:

90

answers:

2

Hello, I'm looking for any pointers on how to write a rails web app without ActiveRecord.

A doc or an example of a (not too complex) web app using storage backends other than a relational database would be greatly appreciated.

It's not clear on what should be implemented in the model classes in order to make the rails app work without the ActiveRecord layer.

Thanks,

+3  A: 

Of course it's possible, here, for example, MongoMapper is used instead of ActiveRecord:

http://railstips.org/blog/archives/2009/07/23/getting-started-with-mongomapper-and-rails/

Mladen Jablanović
Great, this seems pretty close to what I was looking for ! Thanks for the pointer
devlearn
+2  A: 

Note that this will seem a lot easier with Rails 3. Rails team spent a lot of efforts on ORM agnosticism when pushing to beta. They've created a public API (ActiveModel) for different ORMs to implement, so that an ORM can serve as a drop-in replacement for ActiveRecord. That way you'll just be able to define models in terms of your ORM without any extra efforts.

DataMapper already has an implementation of ActiveModel in dm-rails, and there'll be more to come.

See this post by Yehuda Katz for details.

neutrino
That's nice ! I'll check 3.0 beta, however currently I'm on 2.3.5 ...
devlearn