News for hackers. Stuff that matters.
Re:Are Rails and Django communities re-inventing the wheel? by EugeneOZ on Tuesday December 25, 2012 @05:37PM (#4967306)
"Models are intended to serve only as an abstraction to the database. They are meant to be 'models of data'."

It's about Ruby or common? Because I'm sure Models could have 0 code of working with database and business-logic only. It depends on architecture of project.

Re:Are Rails and Django communities re-inventing the wheel? by dknight on Tuesday December 25, 2012 @05:54PM (#4967351)
Model classes in Rails inherit ActiveRecord::Base. So, you can call a class method like update_all which is equivalent to an update statement on the table.

'Models could have 0 code of working with database and business-logic only' Well the business logic creeping in is one of the issues here. That is why there are attempts to separate out the business logic as in case of the use of /app/use_cases [refer to the link of use cases in the article].

Re:Are Rails and Django communities re-inventing the wheel? by philwelch on Tuesday December 25, 2012 @06:29PM (#4967452)
There's nothing forcing your model classes to inherit ActiveRecord::Base. It's perfectly acceptable to use other ORMs or even bare Ruby classes as models. If the only thing you want to do is database operations, ORM is a waste of time anyway.