5 ms·
I've used NHibernate (which is the .NET port of Hibernate) and Rails ActiveRecord. The biggest difference to me is that Rails ActiveRecord encourages you to wo
by kpanghmc 16y ago
I've used NHibernate (which is the .NET port of Hibernate) and Rails ActiveRecord.
The biggest difference to me is that Rails ActiveRecord encourages you to work from the database first. That is, you define your database tables and columns which are then used to generate your classes. In contrast, NHibernate (and I'm assuming Hibernate as well) encourages you to design your classes first and worry about persistence later.
There are merits to both approaches. In general, I'd say that Rails ActiveRecord is much easier to use and get started with while NHibernate allows for more flexibility in your domain model.
- jarin 16y agoIf you prefer the flexibility of the class-first model, it might be better to use something like Mongoid (with MongoDB) instead.
- kpanghmc 16y agoOr DataMapper if you want to keep using a relational database as your persistence medium.
- xentronium 16y agoBtw, datamapper has a mongo adapter too, so it isn't restricted to RDBMS.