Hi Kohei,
Kohei Yoshida wrote:
Hi Juergen,
On Fri, 2008-08-29 at 16:24 +0200, Juergen Schmidt wrote:
If you need more info please let me know
Well, I have one question.
I was trying to add a new property to one of the services I created, but
the idl parser kept complaining. After a while I concluded that the new
style service no longer allows the old style properties. I then ended
up adding it as an attribute to the (only) interface for that service.
Thus my question is this: is it true that old style properties are no
longer allowed in a new style service?
yes that is true. The multiple inheritance interfaces with attributes
can be seen as a replacement or alternative for the old style services.
The advantage is that you can use them type safe as parameter type or
return value. That of course allows to define more intuitive APIs
because the API user can see directly what kind of type/object it is.
Our generic and abstract usage of the old style services that are only
documented caused a lot of problems to API users. We think that a more
concrete but type safe API can improve this situation. In many cases
always the same object type is returned but it is not clear for the user
what kind of object it is.
Anyway the drawback is that you can't easy add a property
later/attribute later on. But you can let the API unpublished until it
is finished. We recommend to publish an API after 2 releases or so if it
is not intended to be private only (which should be the minority).
Adding an attribute later on would mean that the code has to be
recompiled. From Basic or any other language using invocation it should
be no problem at all. But we still have not finally defined if we will
allow this kind of changes (and others) for example to major releases. I
am currently to busy to come up with my proposal :-(
If you need the concept of optional properties you still can inherit the
XPropertySet and XPropertySetInfo interfaces etc. and can document these
properties in the interface documentation. But for all non optional
properties the attribute concept is much easier to understand and to use
for our users. And of course it means type safety and no conversion from
Any ...
And the possibility of constructor methods is also a big advantage to
instantiate new service objects.
Think about it and i am sure that you will like it. And that you will
agree that we can provide more intuitive and better API's using this new
approach.
Juergen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]