title: MVC: why do we need "controller", or when should we use this pattern?
body: <p>I have read many publications about MVC, but I still can't clearly understand why do we need "controller".</p>
  
  <p>I usually write applications in <em>client-server</em> model: </p>
  
  <p><em>server</em> contains all the business-logic, and it knows nothing about the gui. It does the main job, and it is as portable as possible.</p>
  
  <p><em>client</em> is a GUI, it binds to the server, interacts with user, sends commands from user to the <em>server</em>.</p>
  
  <p>I like this architecture, and I can't figure out why do people really need one more medium between <em>client</em> and <em>server</em>, which seem to be <em>controller</em>? </p>
  
  <p><strong>UPD:</strong> simple example: assume we need to write some data logger. Data comes from the COM port, it is encoded by some protocol. Need to show received messages in a simple log window.</p>
  
  <p>How would I make it:</p>
  
  <p><em>server</em> contains the following items:</p>
  
  <ul>
  <li><code>Data_receiver</code>: actually receives raw data from the COM port, but it's interface, so we are able to make some another class that receives data from any other source;</li>
  <li><code>Data_decoder</code>: takes raw data and returns resulting decoded messages, it's interface too, so we can change encoding protocol easily;</li>
  <li><code>Data_core</code>: using instances of <code>Data_receiver</code> and <code>Data_decoder</code>, emits signals to clients.</li>
  </ul>
  
  <p><em>client</em> contains the following items:</p>
  
  <ul>
  <li>Appl core: creates instance of <code>Data_receiver</code> (the one that connects to COM port), <code>Data_decoder</code> and <code>Data_core</code> (which takes references to <code>Data_receiver</code> and <code>Data_decoder</code> instances), also creates GUI simple log window (which takes reference to <code>Data_core</code>);</li>
  <li>GUI simple log window: binds to the <code>Data_core</code>, i.e. listens for the signals emitted by it, and displays received data.</li>
  </ul>
  
  <p>As I understood what I have read about MVC, GUI should not actually take received messages from the <code>Data_core</code>, because <em>controller</em> should do that and then pass data to the GUI. But what bad things happens if GUI takes this data directly from the <em>model</em>?</p>