4 ms·
Related: The "AnemicDomainModel" https://www.martinfowler.com/bliki/AnemicDomainModel.html https://www.martinfowler.com/bliki/AnemicDomainModel.html In other w
by esaym 7y ago
Related: The "AnemicDomainModel" https://www.martinfowler.com/bliki/AnemicDomainModel.html https://www.martinfowler.com/bliki/AnemicDomainModel.html
In other words, there should be another layer in-between your DAO (data access object, ORM, etc) and controller. The "Model" in MVC was never meant to represent a single row of a database in object form. A Model should have a DAO but a Model should not be a DAO.
- knubie 7y agoThe whole point of the Active Record pattern is that domain objects double as DAOs. https://martinfowler.com/eaaCatalog/activeRecord.html https://martinfowler.com/eaaCatalog/activeRecord.html
- nullwasamistake 7y agoI agree. Not a fan of Martin Fowler for many reasons but a good ORM is your DAO. Otherwise there's not much a point