Jonathan Biggar wrote:
>
> ... (stuff from Michi Henning deleted)
>
> Michi, you are getting overly broad in your complaints about OBV. There
> is a class of valuetypes that are immediately useful and valuable:
> valueboxes and valuetypes with only public state members and no
> operations. Since neither of these require any significant user written
> code to operate properly, yet provide significant new semantics (nil and
> referential identity), they do not have the problems that you are
> complaining about. With these valuetypes, I have the ability to create
> and transmit arbitrary graph-like data structures in their direct, most
> useful form without having to rely on arbitrary flattening techniques
> that complicate the issue.
I would agree that valuetypes without operations are a useful addition.
But I think that is about where the usefulness ends.
> Also, I believe that using valuetypes with operations can be successful
> as long as the valuetype definer does one of two things:
>
> 1. Publish the source code for the valuetype operations (preferably in
> multiple languages, but at least in clean portable code in one common
> language) or
I have to side with Michi when it comes to operations on valuetypes.
Perhaps you would care to estimate the amount of time it would take to develop
a C++ equivalent for the valuetype that is generated from applying the Java to
IDL mapping to "java.util.List", for the purpose of being able to write a C++
client that can call a finder method that returns a collection of object
references on the home interface of an EJB entity bean (using IIOP as defined
by the EJB / CORBA interoperability document).
Perhaps someone can create a grad student project to do the C++ implementation
for the java::util::List valuetype so that a C++ client using IIOP can
interoperate with an EJB component using the following EJB home interface
(AccountHome)
interface Account : javax::ejb::EJBObject
{
double getBalance();
};
interface AccountHome : javax::ejb::EJBHome
{
Account findByPrimaryKey(in CORBA::WStringValue key);
java::util::List findAllAccounts();
};
The project of course would be to develop a portable C++ client that
can retrieve the total of all account balances (never mind the rounding
errors that result from using 'double' for storing money values).
I don't expect that this project will be finished quickly. The point
of the project of course would be to determine exactly how hard it really
is. If we are really lucky, perhaps somebody has already done this and
can report on how many person-months it took.
The java::util::List and java::util::Collection valuetypes must be the
most important as far as 'textbook' current interoperability between
CORBA and EJB is concerned. If the porting of the operations on these
valuetypes does not prove to be easy, it does not fare well for
valuetypes with operations in general.
As soon as you allow people to use valuetypes with operations (and especially
in the case of Java), you end up with an interoperability nightmare. The sooner
folks realize this, the better off we'll all be.
> 2. Document the behavior of the operations with at least the level of
> rigor that is found in the C or C++ standard library documentation.
That's all very well, but item (1) above is the main sticking point.
________________________________________________________________________________
Evan Ireland Sybase EA Server Engineering [EMAIL PROTECTED]
Wellington - New Zealand +64 4 934-5856
===========================================================================
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".