title: how to handle model crud exceptions
body: <p>A while a ago I started a web application with JavaScript and HTML on the frontend and PHP on the backend. Among others I included backbone.js to my frontend frameworks.<br>
  I learned that in the client server communication there are 4 different types of operations: create, update, delete and read.<br>
  Read: you send the unique id of a certain model and you get the record back.<br>
  Create: you send the record data. Sometimes the id is also created on the client, other times it is created on the backend.<br>
  Update: you send the model data with the changed values to the backend.<br>
  Delete: you send the id of the model and it will be deleted.  </p>
  
  <p>But then, in practice, you learn, that there are special cases, that do not fit into the basic schema.  </p>
  
  <p>For instance: Login, authentication.</p>
  
  <p>In the first web application I wanted to squeeze this case into the basic operations. So I used the following appoach:</p>
  
  <p>In my authentication I need some data, some attributes of a certain user account. So this was my model. I provided the id and got the user model back.<br>
  But this case, this approach is not clean.  </p>
  
  <p>You do not only provide the key (the user name), but you send the user name and the password. Furthermore you don't get the user data as answer to this request, but the status (successful / failed). </p>
  
  <p>Now I start another application. This time I want to get I done in a clean way.</p>
  
  <p>Can you help me in this attempt?</p>
  
  <p>When I think about this clean approach I have the following considerations:</p>
  
  <p>In this login case I want to send 2 models with one transmission, with one request:  </p>
  
  <p>The first model is the authentication model. It has no "id" because there is only one instance of the class. It has the attributes "user name", "password" and "authentication status". In the answer the back end fills in the authentication status. </p>
  
  <p>The second model is the user model. I provide the user name (id) and get the user data back from the server.</p>
  
  <p>What do you think about these first thoughts in order to get a clean structure for my login case. Was the first approach better? </p>
  
  <p>What is your approach?</p>