title: How to use DTO in JSF + Spring + Hibernate
body: <p>Assuming that i'm new about the topic DTO.
  I can't understand if it is correct to use the DTO in tandem with JSF, Spring and Hibernate.<br>
  Let me explain, so far I have used the entity bean, created directly from the database, both in business layer and in the presentation layer.
  Now I decided to try using the DTO approach, but I can not understand how they can help.<br>
  For example if I have two classes User and Message, and a user has more messages associated; how can I populate the DTO from the database? Or do I manually populate the DTO at the business layer?
  can someone post an example on how to use DTO?</p>
  
  <p>Thank you in advance.
  Regards,
  Roberto</p>