title: DTO and DAO concepts and MVC
body: <p>1) Why do we use <code>DTO</code> and <code>DAO</code>, and when should we use them. I am developing a <code>GUI</code> Java software to do with inserting, editing, deleting data. But I am struggling to distinguish between <code>DTO/DAO</code> and <code>Model</code>, <code>View</code>, <code>Controller</code> (MVC)  Structure? Are they similar, which is  better to use when interacting with database through Java <code>GUI</code>. </p>
  
  <p>2) One thing I'm really curious about is whether it is a good practice to have <code>view</code> and <code>Controller</code> in one class. If we think about <code>Netbeans</code>, you can create <code>GUI</code> Frame Class and add components like <code>JButton</code> onto the frame, double clicking the button will take you to the <code>actionListener</code> method(Controller) which appears to be in the frame the data is to be displayed to the user (View). So they're in the same class. Is that completely going against the concept then or not?  </p>
  
  <p><a href="http://www.youtube.com/watch?v=Iwwznm9XSME" rel="noreferrer">Here</a> is what I'm talking about</p>
  
  <p>bad practice to have view and controller in one class? </p>