This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data Transfer Object and Bean

 
Vaibhav G Garg
Ranch Hand
Posts: 143
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

In the projects, we have two kinds of classes: Beans and DTOs. Both have some properties and corresponding getters/setters. So, what is the actual difference between two. Can we use just beans for the same purpose?

Thanks.
 
Sujeeth Pakala
Ranch Hand
Posts: 104
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Technically both are same. Java beans are called as data transafer object in particular context. DTO object carries some information from one object to other (remote) object, and DTOs are programmed as java bean.

With POJO programming we can program a servlet, EJB or a web service. But they are still functioning as Servlet, EJB and Webservice. But, we are not calling a Servlet as EJB or the otherway.
 
Muhammad Khojaye
Ranch Hand
Posts: 449
IntelliJ IDE Java Scala
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might helpful to read
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic