• Post Reply Bookmark Topic Watch Topic
  • New Topic

DTO help  RSS feed

 
chuck keuper
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am tring to figure out how to use DTOs. I have read some general articles
on DTOs and the benefits but I have not run across any code samples to clear
up my confusion. I am using JBuilder9, BES 5.2. I have created a DTO from
jbuilders Launch DTO/Facade Wizard which has given me a DtoAssembler,
Delegate, and a Dto. I also have a SessionFacade. I am not quite sure how
all this ties together. I understand how session beans work with entity
beans. Can anyone clear up my confusion or pass on some general code
samples???
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi chuck

Okay so you understand how Session, Entity beans interact. Now, if we go one step further then "how session beans communicate with web tier(jsp/servlets)?". By communication I mean the data part of the communication not the remote call specifications.

If we had a User Profile editor interface (UserProfile.jsp) then it would have to display a UserProfile given some user key, right? And in our model we would have UserProfile as Entity bean and some session bean returning the data for that entity bean to the JSP so it can display the data , right?

Now, here Session bean,
1. queries appropriate UserProfile entity bean
2. prepares DTO - UserProfileDTO serializable object
3. sends it to the JSP/Servlet
4. at the end UserProfile.jsp gets that object and displays it in html

I hope this helps.

Regards
Maulin
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!