Re: Comments on Application IDL

Jayakumar Muthukumarasamy ([email protected])
Mon, 19 Dec 1994 09:48:07 -0500 (EST)

>
> 1- expose the attribute as a sequence, so that clients can access all the
> elements from the sequence. The problem is that clients should not add
> elements to the sequence itself, but call the add methods on the objects that
> contain the sequence.
>
> 2- don't expose the attribute as a sequence, but rather use an iterator.
>
> The disadvantage of 2- is that we need to create an iterator class for each
> kind ok interface that can be stored in some kind of collection.
>
> JK says it is bad to have all these extra collection classes. I don't see
> why this is bad. Is it inefficient? Is it a pain to write?
>
> Since we don't have that many different classes of objects, I think that there
> won't really be a huge proliferation of iterator classes. I think the macro
> idea works ok (saves typing), and allows us to have all the iterators we need.
>
> I must confess that I like the idea of iterators because it completely hides
> the representation of the sequences. Also iterators provide added
> flexibility. I will write another message illustrating this. Also, the fewer
> CORBA/IDL primitives that we use, the easier it will be to make our
> implementation independent from CORBA vendors.
>

I did some testing and found that for each iterator we use, the overhead
in code, including both the client and server sides is about 300 lines.
This is just for the interface to the iterator alone. We, could parameterize
the implementation, so that should not take much code. I am concerned about
the overhead here. But, I guess we do not have much choice.

-jk