May 23, 2012
Posted by on
I so hate how poorly MODEL is understood in Web development – quote from mongoose thread: “Try not to push too much down to the model – helpers on the model are
generally to ensure the integrity of the model, rather than for enforcing business logic”.
But here’s the definition
Finally, the model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).
“Application domain”. That means business logic, if it relates to the state of the object. Can’t you guys just rename your thingies data abstraction classes? That’s what they are.
A virtual property, or a property with accessors, should be available in every type of access on the model. That’s how we hide the details of of data representation in the model.