I strongly disagree as well. The co-location of interfaces within a
package is the best indicator that they are related; if we separate
them then we lose this connection and all concept of what the contract
is.

Example: ConfigurationAdmin (provider) and ConfigurationListener
(consumer). The contract of the Config Admin spec is not any one
individual interface, it's the aggregation of interfaces represented
by the org.osgi.service.cm package. Everybody uses the same contract,
but they have different relationships to it... i.e. they are providers
or consumers of that contract.

Although it may appear that the consumer/provider distinction is made
with respect to individual interfaces, it is in fact done with respect
to the whole package. That is, I am a provider of org.osgi.service.cm
if I implement *at least one* of the provider types
(ConfigurationAdmin, Configuration) from that package.

Neil


On Mon, Apr 15, 2013 at 12:13 PM, Marcel Offermans
<[email protected]> wrote:
> On Apr 15, 2013, at 13:04 , Emily Jiang <[email protected]> wrote:
>
> As a side point, I think when those annotations are available, we should set
> a best practice (such as splitting provider type interfaces from consumer
> type interfaces so that they are in two packages. The package version
> management can be fine grained.)
>
>
> So, for example, you would argue that for EventAdmin we start splitting this
> API in two packages?
>
> That is not an accepted best practice, nor a good idea in my opinion.
>
> It sounds more like a trade-off that's being made to accommodate tooling,
> and a bad trade-off if you ask me.
>
> Greetings, Marcel
>
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to