-
best practice to transfer data back to web tier (2 messages)
- Posted by: sairam manda
- Posted on: October 26 2007 06:29 EDT
Ejb business method implementation question My application is two tier app tier and web tier .Web server has no database access so any request to database should got to appserver. I am confused about the implementation of business method. Need to know best practices. I have a businessObject Public interface IEmployee { Public getEmployeName(); } Public CustomEmployee implements IEmployee { Private String name; CustomEmployee(){ name=// call to dao get employee name } Public getEmployeName(){ return name; } } My session bean creates instance of new CustomEmployee and return IEmployee. My question should I use DTO to transfer data back to web tier or just return instance of IEmployee ? Want to follow best practices.Threaded Messages (2)
- best practices business method by Prasanta Dash on October 30 2007 07:27 EDT
- Re: best practice to transfer data back to web tier by guddu sk on November 06 2007 03:28 EST
-
best practices business method[ Go to top ]
- Posted by: Prasanta Dash
- Posted on: October 30 2007 07:27 EDT
- in response to sairam manda
Always its best to use DTO to tranfer data to and fro, while communication is happening between multiple tires. -
Re: best practice to transfer data back to web tier[ Go to top ]
- Posted by: guddu sk
- Posted on: November 06 2007 03:28 EST
- in response to sairam manda
I came across a nice webpage based on this specific discussion It is DAO explained http://question2answer.googlepages.com/data-access-object-DAO.html Hope this helps.