Quantcast
Channel: DataMapper or ActiveRecord? | Wrangl
Browsing all 55 articles
Browse latest View live

It's quicker to get going because you don't have to write migrations

Rather than writing lots and lots of migrations early on, you just add property declarations to your model and use DataMapper.auto_upgrade! to create the appropriate columns in the database. Later on,...

View Article



It's easy to choose whichever data backend you like

There are adapters for Postgres, Mysql, Couch, Mongo and lots more. You choose a backend, add your configuration, and your models behave as expected without having to write any backend-specific...

View Article

It's lighter. You only need to include the bits you're going to use

If you don’t want migrations, or validations, or timestamps, you don’t include them. Consequently less unused code is left hanging around in your application.Contribute to the debate »

View Article

It's included by default in Rails

If you’re building a Rails application, by default it would be set up to use ActiveRecord. Why change it?Contribute to the debate »

View Article

There's a bigger community behind ActiveRecord

If you’ve got a problem, you can call on more resources to help you solve it. Throwing an error into Google will often bring up a solution, whereas with Datamapper it’s harder to find solutions to...

View Article


DataMapper behaves in unexpected ways

Often you expect DataMapper to behave a certain way, but it does the opposite. For instance: DataMapper.auto_migrate! This will automatically migrate your database to the correct schema to match your...

View Article

You get "eager loading"

Rather than having to generate unnecessary queries, DataMapper only issues the minimum number of queries to satisfy the ruby code you’ve written. This makes for smarter, faster applications.Contribute...

View Article

More people know how to use ActiveRecord, so it's easier for collaboration

If you’re working with inexperienced developers or a team that may change a lot, it’s easier to use an ORM that they are more likely to be familiar with.Contribute to the debate »

View Article


There are lots of adapters for ActiveRecord too

There are plenty of adapters being developed, and you can easily write your own if one is not available.Contribute to the debate »

View Article


Most of the time you just want everything in one place

Having to remember to include dm-migrations and dm-timestamps in every project is irritating. Most of the time you just want everything.Contribute to the debate »

View Article

Loads of gem dependencies vs one gem dependency is more brittle

Having a dependency on more points of failure is no argument against just having a single gem.Contribute to the debate »

View Article

It's only unexpected if you are used to ActiveRecord

DataMapper isn’t a clone of ActiveRecord - it does things differently, otherwise what would be the point? It follows the principle of least surprise throughout.Contribute to the debate »

View Article

Not writing manual migrations gets you into bad habits

If you don’t instill the rigour of writing migrations throughout your development, you’ll get to a point where you will accidentally get your database into a bad state, and suffer data-loss, downtime...

View Article


The migrations are still being done, so you could be hiding a problem

Let’s say you add a property to DataMapper model, then do some work, then remove the property, the column will remain in the database. That should be fine, but if you had :required=>true on it,...

View Article

There's a big (and growing) community behind DataMapper too

Contribute to the debate »

View Article


Learning a new ORM can make you a better developer

Getting settled into a rut of only using ActiveRecord can mean you’re not getting a full understanding of what’s happening behind the scenes. Varying the tools you use from project to project depending...

View Article

Eager loading is nice if it works

Trying to work out when something is going to be eager loaded, and when something isn’t can just come down to guesswork and trial and error.Contribute to the debate »

View Article


ActiveRecord behaves in unexpected ways

Coming from a traditional ORM like (N)Hibernate, DataMapper behaves in a much more familiar way than ActiveRecord.Contribute to the debate »

View Article

There is great support in IRC

I believed this about ActiveRecord too, and it was hard for me to find support which was already written. However, the IRC channel #datamapper on irc.freenode.net is full of committed and intelligent...

View Article

You get eager loading with ActiveRecord too

Perhaps it doesn’t always result in the same efficient SQL, and it’s always explicit, but Customer.includes(:orders => :order_lines) is eminently possible.Contribute to the debate »

View Article
Browsing all 55 articles
Browse latest View live




Latest Images