ruby-on-railsactiverecorddatamapper

How does the ActiveRecord pattern differ from the Domain Object or Data Mapper pattern?


I was looking at DataMapper, which appeared at first glance to use the ActiveRecord ORM pattern. Other people said that it uses the DataMapper and/or the Domain Object pattern.

What is the difference between those patterns?


Solution

  • The main difference between the two patterns is this:

    DataMapper is potentially more complex then ActiveRecord but it's a lot easier to develop your domain model and database asynchronous than with ActiveRecord.