File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes Data Transfer Object and Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Data Transfer Object and Bean" Watch "Data Transfer Object and Bean" New topic
Author

Data Transfer Object and Bean

Vaibhav G Garg
Ranch Hand

Joined: Sep 23, 2011
Posts: 132
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

Joined: Mar 24, 2009
Posts: 80
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.


Regards, Sujeeth Pakala
SCJP, SCWCD, SCBCD, ICAD, XML Master Basic, Certified SOA Professional
Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

This might helpful to read


http://muhammadkhojaye.blogspot.com/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data Transfer Object and Bean
 
Similar Threads
Doubts in EJB
[Easy]Coffee Can Problem
getting value of request bean into other
Is the Bean Pool a model for our after life?
Local interface