Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

OR mapping framework for RoR

 
Ranch Hand
Posts: 8943
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does RoR have OR framework built -in ?
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • 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: 8943
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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: 8943
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • 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
  • 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: 8943
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Lasse. Looks like the competition for frameworks has already started in the Ruby world.
 
You have to be odd to be #1 - Seuss. An odd little ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic