| Author |
OR mapping framework for RoR
|
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
|
Does RoR have OR framework built -in ?
|
Groovy
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
Yes. It's called ActiveRecord. I've heard that it's possible to replace ActiveRecord with Og, which is another ORM framework for Ruby, born as part of the Nitro web framework.
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
When you say it is possible to replace ActiveRecord by Og, will the data access code change? In java if I move from Toplink to Hibernate I will have to change the code.
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
I haven't done that myself so I might be talking crap, but the above link seems to suggest that you need to write new glue code to replace AR with Og rather than change your application code.
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
Originally posted by Lasse Koskela: I haven't done that myself so I might be talking crap, but the above link seems to suggest that you need to write new glue code to replace AR with Og rather than change your application code.
Or, of course, you could just change your application code to use Og's API rather than ActiveRecord.
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
Thanks. How does one chose between ActiveRecord and Og.
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
Originally posted by Pradip Bhat: Thanks. How does one chose between ActiveRecord and Og.
You don't choose. You just start using ActiveRecord as it is the standard. Seriously, the number of people using Og must be several magnitudes smaller than those using ActiveRecord so you better have a real good reason to choose Og. Community matters. It's slightly different if you're a seasoned Ruby hacker, prefer Og, and are willing to jump inside the framework yourself to figure out what you're doing wrong. (Disclaimer: remember that I still haven't actually used Og myself so I'm talking about my perceptions here)
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
Thanks Lasse. Looks like the competition for frameworks has already started in the Ruby world.
|
 |
 |
|
|
subject: OR mapping framework for RoR
|
|
|