Posts Tagged Tutorial
Write your own custom DataMapper adapter
Posted by Matt Aimonetti in News, Tutorial on September 29th, 2008
If you read this blog, you probably know that Merb‘s best ORM friend is DataMapper.
Merb works very well with ActiveRecord and Sequel but most of the Merbivores get excited about DataMapper.
DataMapper has a lot of cool stuff going for it. I’m planning on writingi few articles about what I particularily like with DM and some of the misconceptions.
I’m going to give a talk about DataMapper during MerbCamp and something I want to cover is the fact that you can write DM adapters for virtually anything. From an adapter for couchdb (available in dm-more) to an adapter for SalesForce API. That’s the kind of stuff that gets me excited, a bit like what Ambition does but built-in in DM.
So, I decided to take some advise from Yehuda and dkubb and wrote my own adapter for Google Video. I had just finished a gem to retrieve google videos for a given google user and thought it would be a perfect exercise to mix a http-scraper with a DM adapter.

