polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: API change suggestion
Date Thu, 03 Aug 2017 00:57:10 GMT
On Thu, Aug 3, 2017 at 2:41 AM, Kent SĂžlvsten <kent.soelvsten@gmail.com>

> Another (unrelated) thought looking at this API : What is the meaning of
> properties for a service or a transient (ServiceDescriptor extends
> StatefulCompositeDescriptor)?

Well, they still have "state" even if that state is not persistable.

For transients, one primary function would be to provide public Property
access, rather than a setter/getter culture, i.e. I might want to have a
struct-like data type.

One usecase for services (for all) is that "state" is common/shared across
all fragments within the Composite, unlike member fields. This is rather
useful, even for services, to have a shared state within the composite,
especially when these are private and we don't want to expose such state to
the outside world.

So, I don't think there is anything wrong here, perhaps other than that
"state" has come to mean "persisted state" in too much of the documentation
and discussion.

Niclas Hedhman, Software Developer
http://polygene.apache.org - New Energy for Java

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message