# ActiveRecord or OG?

**URL:** <https://www.ruby-forum.com/t/activerecord-or-og/70468>\
**Category:** Ruby\
**Created:** [February 19, 2006, 4:24pm UTC](https://www.ruby-forum.com/t/activerecord-or-og/70468 "2006-02-19T16:24:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jansenh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Post date:** [February 19, 2006, 4:24pm UTC](https://www.ruby-forum.com/t/activerecord-or-og/70468/1 "2006-02-19T16:24:04Z")

</div>

Hi group. I am an avid lurker.

ActiveRecord (without Rails…) or ObjectGraph ? I have no real  
experience with ORMs. Any insight to this desicion is appreciated.

The Case::  
I want to write a SOAP based server interface according to a specific  
industry domain API based on SOAP/XML-RPC/HTTP with a set of CRUD style  
methods and 20+ XML objects with a decent level of complexity. The  
interface also holds some business rules and rules for behaviour. The  
backend will be a mySql database and I want to learn/utilize ORM for  
the first time.

One obvious answer might be: “Try both…”, but I dont have the  
capacity to do that.

regards, Henning

---

<div class="post-metadata">

**Author:** ![jansenh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Post date:** [February 19, 2006, 4:39pm UTC](https://www.ruby-forum.com/t/activerecord-or-og/70468/2 "2006-02-19T16:39:12Z")

</div>

jansenh wrote:

> Hi group. I am an avid lurker.
> 
> ActiveRecord (without Rails…) or ObjectGraph ? I have no real  
> experience with ORMs. Any insight to this desicion is appreciated.
> 
> …
> 
> One obvious answer might be: “Try both…”, but I dont have the  
> capacity to do that.

Well, you probably do. They are both pretty straightforward to use.

It would be worth trying to use both, as they have complimentary  
approaches to ORM, and the best fit for you may depend on how you like  
to work.

–  
James B.

“A principle or axiom is of no value without the rules for applying it.”

- Len Bullard

---

<div class="post-metadata">

**Author:** ![jansenh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Post date:** [February 19, 2006, 4:51pm UTC](https://www.ruby-forum.com/t/activerecord-or-og/70468/3 "2006-02-19T16:51:25Z")

</div>

On 2/19/06, jansenh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> interface also holds some business rules and rules for behaviour. The  
> backend will be a mySql database and I want to learn/utilize ORM for  
> the first time.
> 
> One obvious answer might be: “Try both…”, but I dont have the  
> capacity to do that.

One way to decide is by choosing which of these two statements seems  
more ‘right’ to you.

1. Ruby objects are wrappers around rows in my database.
2. The database is where my Ruby objects go when they are sleepy.

#1 is ActiveRecord, #2 is ObjectGraph.

That being said, James is right, and you should at least briefly try  
both. They are both simple to install and try out. If you intend to  
use the rest of Rails, and not just the ORM, choosing ActiveRecord  
will make your task easier, due to the numerous ActiveRecord-aware  
helpers.

---

<div class="post-metadata">

**Author:** ![jansenh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Post date:** [February 19, 2006, 8:22pm UTC](https://www.ruby-forum.com/t/activerecord-or-og/70468/4 "2006-02-19T20:22:11Z")

</div>

Wilson B. wrote:

> One way to decide is by choosing which of these two statements seems  
> more ‘right’ to you.
> 
> 1. Ruby objects are wrappers around rows in my database.
> 2. The database is where my Ruby objects go when they are sleepy.
> 
> #1 is ActiveRecord, #2 is ObjectGraph.

An apt metaphor. Og is on my radar as something to try. I’m more of  
a #2 guy.

Hal
