3 ms·
All that I am getting is that you seem convinced that the model is purely data. It isn't. Behaviours are part of the model. The behaviour of "getting info fr
by papsosouid 14y ago
All that I am getting is that you seem convinced that the model is purely data. It isn't. Behaviours are part of the model. The behaviour of "getting info from some remote data source" is absolutely part of the model.
- karmajunkie 14y agoActually, if you're playing with DCI, your data classes should be thin data containers. But that's neither here nor there. Even in a more typical Rails application, domain behaviors are supposed to be on the model. The responsibility for going over a network is almost never going to be a domain behavior. Just because you use the data in some way doesn't make it a domain behavior. Getting data from a remote data source is definitely not a part of the domain, and the fact that Rails has many developers convinced that's the way its supposed to be illustrates just how far down the rabbit hole the Rails world has fallen.