title: Should a model change other models or a controller should change each model? (Rails or other Model-Controller architecture)
body: <p>In a server application where exists models like "Articles", "Jobs", "Workers" and</p>
  
  <p>For example in a server side app where there are those models:</p>
  
  <ul>
  <li>Products</li>
  <li>Jobs</li>
  <li>Workers</li>
  </ul>
  
  <p>And there is an action like start job which does the following things:</p>
  
  <ul>
  <li>Products: the job's product's quantity requested is increased</li>
  <li>Jobs: the job is inserted</li>
  <li>Workers: the job's worker is set unavailable and it's saved a reference to the current job</li>
  </ul>
  
  <p>Now My question is: where should I put the logic described above?</p>
  
  <ul>
  <li><p>Should I have a controller named "jobs/start" which calls the method on the model "job.start(args...)". Inside this model method it calls "product.increaseRequestedQuantity(args...)" and "worker.setBusy()"</p></li>
  <li><p>Should I have a controller named "jobs/start" which calls "job.start(args...)" then "product.increaseRequestedQuantity(args...)" and "worker.setBusy()"</p></li>
  </ul>
  
  <p>I don't really know which is a best practice, in the first the model is aware of the other models, but the logic is central. In the second the models are not aware of each others <em>directly</em> but the logic is more distributed. Also having a method named "start" on the job, one would assume that it would start a job at the application level (which means it changes the product and worker model) but affects at model level (means that only changes the job model, without changing the product and worker model).</p>
  
  <p>What are your opinion about the matter and this separation of concerns?</p>
  
  <p>This applies for people that used Rails, even if I'm not talking about Rails in particular (my own framework based on services+models in node.js, where a service is like a controller in Rails), or any other MC framework, (note that I don't care about the view because the service must only export the data. The view is only on the client side which requests data).</p>
  
  <p>I've read about <a href="https://stackoverflow.com/questions/64214/should-rails-models-be-concerned-with-other-models-for-the-sake-of-skinny-contro">Should rails models be concerned with other models for the sake of skinny controllers?</a> but I would like something more deep explained if possible, also with book/links references at this exact topic.</p>
  
  <p>Thanks for your time at reading my question (:</p>