Displaying 1 result from an estimated 1 matches for "userdao".
2006 Apr 13
3
Java/J2EE DAO/model objects vs. Ruby/Rails model objects
...e much
logic, they are basically data holders. It seems to be considered a sin to
put persistence logic in the domain model objects, instead it should be put
a DAO (Data Access Object). I have always thought this seems funny, after
all, what seems more natural/object-oreiented?:
user.save()
or
userDao.save(user)
In Ruby/Rails, the model objects implement persistence themselves, by
extending ActiveRecord::Base. So it seems as if the Ruby/Rails way is the
opposite of the Java/J2EE DAO pattern. In your opinion, is the DAO pattern
fundamentally flawed? Or is Ruby/Rails only meant for simple/smal...