struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Mistroni" <>
Subject RE: design issue, need comments
Date Wed, 28 Apr 2004 12:23:21 GMT
	With validate/validator method as far as input is concerned..
If then in one field I am expecting a 'proper' value (let's say, I have
A bunch of 'customers' objects, and in the input screen the user enters
A customer that is not valid (it's not one part of the 'bunch'), then
An exception will be raised from the backend..

If u can see any particular case that might cause problem (or that 
I can't deal with either thru the validate() or exception) you're
Welcome to point it out :-)

Thanx 4 the comment and regards

-----Original Message-----
From: Takhar, Sandeep [] 
Sent: 28 April 2004 13:01
To: Struts Users Mailing List
Subject: RE: design issue, need comments

How are you going to deal with invalid input since the ui should deal
mostly with strings.


-----Original Message-----
From: Marco Mistroni []
Sent: Wednesday, April 28, 2004 5:24 AM
To: 'Struts Users Mailing List'
Subject: design issue, need comments

Hi all,
	I recently had a look at WrapDynaBean from
Commons/beanutils package (it's great, btw!) and made
Me think about my I thought that maybe
Some of u can give me some comments on what I m going to explain..

Basically my application is based on  N  custom  DTOs, each different
The other, and that fact implies that it's little bit frustrating
writing a factory when new DTOs are added all the time (and I want to
avoid to write a generic factory    
Public Object getDTO(String name)

My app is layered so that I have a struts layer which interacts with a 
Business delegate layer (which in turn talks to Session fa├žade).

On the struts layer I am using DynaActionForm and
BeanUtils.copyProperties to copy automatically DTOs properties into
DynaActionForm (there are very few 'points' in my code where I need to
know the exact type of the field that I have to access.

So I was wandering, if I use a WrapDynaBean which wraps a custom dto,
The struts-layer and business delegate layer will communicate only thru
WrapDynaBean, where nobody has to know details of DTOs (not even struts
layer since I am using DynaActionForm to copy properties, assuming that
Will work also for WrapDynaBean)

And at this stage, I can write a single factory for business delegates
Returns always a WrapDynaBean

- jsp layer and struts layer interacts using DynaActionForm
- struts layer and business layer interacts using WrapDynaBean
- in the business delegate layer, the proper custom DTO will be 
  retrieved from the WrapDynaBean

everything looks dynamic :-) ....but I m sure there are drawbacks that
I don't know (because I m using struts since few months and because I m
Sure on the list there are people with more experience that I have that 
Can identify the flaws in my design)..

Any comments/hints/suggestions?

Thanx in advance and regards

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message