You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sandeep Takhar <sa...@yahoo.com> on 2002/04/01 07:57:24 UTC

RE: Use of stuts in J2EE

You would use a transfer object (see "EJB Design
Patterns" -- a good book).

There are a large number of options for getting the
data from the formbean into the dto.

The conventional thing that a lot of people are doing
is to have the data transfer object (j2ee blueprints
have recently changed their name from data value
object to transfer object as well) in the formbean:

public class CustomerForm ....
   private CustomerDto customerDto = new
CustomerDto();
   ...

then you can implement a getDto that is in the same
class that retrieves the latest values from the form
bean and returns the dto.

the dto is then written to a session bean.

a good book for all the design pattern terminology is
"EJB Design Patterns".

Sandeep

--- "Jesse Alexander (KADA 12)"
<al...@csfs.com> wrote:
> Hi,
> 
> even though I do not use EJB's:
> 
> Ted's scaffolding page says that the Action is the
> place where this translation
> (from Action-Form to backend-compatible) should take
> place (and vice-versa when
> returning values).
> 
> I think that is the best place.
> Alexander
> 
> -----Original Message-----
> From: Vikram Goyal01
> [mailto:vikram_goyal01@infy.com]
> Sent: Mittwoch, 13. M�rz 2002 09:52
> To: Struts Users Mailing List
> Subject: RE: Use of stuts in J2EE
> 
> 
> Hi Dave,
> 
> Thanks for that info. I have one question.
> 
> When your formbean captures the data that the user
> has submitted, how do you pass this data to the app
> layer? If you pass the same form bean, then your app
> layer is not usable by other clients (or they will
> also have to implement struts). Basically my
> question is, how do you process your form bean into
> a data object? If you create another data object at
> this point, isnt that a performance overhead?
> 
> Rgs
> Vikram
> 
> -----Original Message-----
> From: Dave J Dandeneau
> [mailto:Dave.Dandeneau@viant.com]
> Sent: Wednesday, March 13, 2002 10:10 AM
> To: struts-user@jakarta.apache.org
> Subject: RE: Use of stuts in J2EE
> 
> 
> We are currently implementing a j2ee / struts
> project. If I had any advice to you it would be to
> make sure you read up about common j2ee patterns.
> They can save you a lot of time and help you avoid
> some of the common EJB problems. We are using a
> command pattern which works very well. It is
> similiar to a session facade pattern where there are
> session beans that run all of the logic on the ejb
> container and send only the results back to the
> actions. This helps reduce network overhead, and
> makes transactions very simple. There are a million
> different patterns out there, and the most common
> ones are available at Sun's site:
>
http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/
> 
> Other than that I don't think that working with
> struts and EJBs is much different than working with
> EJBs on a non-struts application. 
> 
> Thanks,
> dave dandeneau
> 
> -----Original Message-----
> From: Vikram Goyal01
> [mailto:vikram_goyal01@infy.com]
> Sent: Tuesday, March 12, 2002 10:50 PM
> To: struts-user@jakarta.apache.org
> Subject: Use of stuts in J2EE
> 
> 
> Hi all,
> 
> I am implementing a J2EE (Enterprise application
> with EJBs) project using struts. If anyone has done
> a similar project and would like to share some
> guidelines please mail back to me. Alternatively, if
> you have any online pointers, articles etc. please
> forward these as well.
> 
> Regards
> Vikram Goyal
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>