This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
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?
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