Hacker News new | past | comments | ask | show | jobs | submit login
DataMapper 1.0 Released (groups.google.com)
46 points by aaronbrethorst on June 9, 2010 | hide | past | favorite | 14 comments



DataMapper is the most serious alternative to ActiveRecord, the de facto standard Rails database layer.

Its most notable difference, besides a simpler and more modular architecture, is the fact that it defines its own schemas from properties of objects (in other words, it generates its own migrations).


We're just getting started with DataMapper too. Lots of things planned in the future as we refine the API and internals.

For example, we're looking towards allowing normal ruby objects to be persisted, not just objects that include DataMapper::Resource. I'm also working on a query/adapter layer that will allow more complex queries to be constructed similar to ARel called Veritas (http://github.com/dkubb/veritas/), except it will include alot of the things we've learned about working with 40+ datastores, some vastly different from RDBMS.


Dan -- thanks for all your hard work! I switched to DataMapper last October and haven't looked back.

For those who aren't aware, DM is like ActiveRecord if it had been designed by a seasoned Ruby programmer who also lives and breathes relational algebra. The method chaining is so powerful you will find yourself amazed that it works, then extremely impressed when you see the SQL that was generated.

I've heard of a few things on the roadmap and they are awesome. Now that DM has gone 1.0 (stable API) I can see no reason why anyone would use AR for a new project.


More on the modular architecture. AR uses polymorphism while DM approaches the problem through a form of composition (modules). This usually leads to more flexible and less complex designs. In AR, only AR objects can be persisted, whereas any object can be persisted using DM.


DataMapper is a Object Relational Mapper written in Ruby. http://datamapper.org/


Thanks. Couldn't make that out from their website easily.


I love the DSL DataMapper has created. It is my favorite ORM. Unfortunately most gems for Rails use ActiveRecord. Rails 3's ActiveModel should make it much easier for other ORMs to compete. Thank you DataMapper team.


I would be so happy if Heroku were to move the version of datamapper they make available to 1.0, I spent a while the other day working out why an app I had done was throwing errors on Heroku, turned out they were using 0.9.11, which didn't have [] & []= functions.

Added the functions myself to the app, and everything worked.

DataMapper, I'm a fan.


can't you just install it by specifying the desired version in your gems manifest?


As long as you're on Bamboo, you should be able to use whatever ORM you want. See http://docs.heroku.com/bamboo for more.


I'm using bamboo + 1.9.1 and so far it's been great.


For those who are interested:

http://martinfowler.com/eaaCatalog/dataMapper.html

and

http://martinfowler.com/eaaCatalog/activeRecord.html

The information was a bit limited, but if you can get the book (buy/library), go for it.


Great! I still use ActiveRecord a lot for legacy Rails apps, but I prefer Datamapper now, partly because it supports MongoDB and mixed relational database and MongoDB backends.


Just wanted to say...I <3 Datamapper, it rocks. When work with pre Rails 3.0 code I really feel that I'm missing the Datamapper Kool Aid a lot!!

Well done guys.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: