Hi Perry!

Here are the answers to your questions:

1.) The Address object has a constructor which takes the attributes needed
to describe the address.

2.) Data validation is definitely tricky.  I have seen the ideas for using a
client created object that validates the data prior to passing to the
component. This idea is not without merrit.  In this case the object would
be mutable, but its role would be restricted to passing only data relevant
to the change.  It would not have a complex object graph and would remain
fine-grained (limited to input validation).

Input validation would be limited to ensuring, for example, that to and from
dates are consistent or that String fields don't contain strange charters.
Personally, I would rather see this type of validation in the GUI but for
reuse I can grudgingly see it defined in PBV object.

The validation PBV object should, other then validation of logic, be little
more then a convenient packaging strategy for passing several values at
once.  This strategy does have its own problems.  You end up with many of
these fine-grained PBVs whose only purpose is validation and to pass a
collection of data to a workflow object for further process. I much prefer
the "icky" long method definitions over this type of validation object
discussed here.

Again the stress is to avoid set and gets - that's a business object design.
We are doing Server-side Business Component Design, which is very different.
Avoid sets and gets and focus your attention of the workflow - what are you
attempting to accomplish.

Richard



-----Original Message-----
From: Perry Hoekstra
To: [EMAIL PROTECTED]
Sent: 2/22/99 10:00 AM
Subject: Re: Pass-by-Value (was:RE: Question regarding Session and Entity
Bean              s)

At 09:34 AM 2/22/99 -0600, you wrote:
>Personally I think this issue about passing partial object graphs is
>irrelevant in some ways.  Two issues come to mind:


Question Richard,

On the immutable object part where get methods are the only methods
provided.  As a client:

1) How would I create a new address object?


2) If through a Entity bean, what about data validation across a
network.
If my business object has eight attributes, that is eight set calls to
the
bean and possibly more if one set fails on data validation.  Granted,
you
could marshall the sets as one call, but that makes things icky. If your
PBV business object also has set methods and has the ability to do data
validation, you eliminate that network traffic and just hand off the
validated Address object to the Entity bean for insertion.  The only
validation you would have on the Entity bean side would be referential
integrity checks where it would be near the database.



Perry Hoekstra - [EMAIL PROTECTED]
-------------------------------------------------
All that is Microsoft does not glitter,
Not all those who wander are lost;
The old AT&T Unix that is strong does not wither,
Deep roots are not reached by frost.

>From the ashes of Spec1170 a fire shall be woken,
A light from the shadows shall spring;
Renewed shall be the Unix OS that was broken,
Linux shall be king.

========================================================================
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to