I don't think that not mixing consumer and provider interfaces is a best
practice.
The OSGi specs - which I think are usually following best practices -
are mixing them. For example event admin where the event admin interface
is in the same package as the event handler.
The markers actually help putting those interfaces into the same
package. In above example you can change the event admin interface
without breaking the event handler.
The framework api does the same, confgig admin etc.
It's good to split packages based on purpose and usage. For example to
move SPI interfaces into a separate package.
Regards
Carsten
Am 29.06.2021 um 16:49 schrieb Bertrand Delacretaz:
Hi Konrad,
On Tue, Jun 29, 2021 at 3:04 PM Konrad Windszus <[email protected]> wrote:
- Please don't mix Consumer and Provider interfaces in the same package
(https://github.com/apache/sling-org-apache-sling-sitemap/tree/master/src/main/java/org/apache/sling/sitemap/generator
and
https://github.com/apache/sling-org-apache-sling-sitemap/tree/master/src/main/java/org/apache/sling/sitemap/builder/extensions)
as that enforces updates to break more consumers than necessary....
Could you elaborate on that? The issue is not obvious to me.
More generally, I think it would be useful for us to document best
practices around Consumer and Provider interfaces.
If someone has links to such best practices that would be great,
otherwise feel free to add some notes in response to this message and
I'll write something up for https://sling.apache.org/
-Bertrand
--
--
Carsten Ziegeler
Adobe Research Switzerland
[email protected]