• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

OR mapping framework for RoR

 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does RoR have OR framework built -in ?
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:
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.



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
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. How does one chose between ActiveRecord and Og.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Lasse. Looks like the competition for frameworks has already started in the Ruby world.
reply
    Bookmark Topic Watch Topic
  • New Topic