sco0ter / babbler

Java library for XMPP clients using JAXB
http://docs.xmpp.rocks
MIT License
7 stars 2 forks source link

Make managers and features opt-in instead of opt-out for external components #155

Open sco0ter opened 5 years ago

sco0ter commented 5 years ago

Original report by Daniel Gultsch (Bitbucket: iNPUTmice, GitHub: iNPUTmice).


I use Babbler fairly regularly to create external components and to basically extend server functionality.

It always felt a little bit weird to me that I have to explicitly disable disco features and certain managers but I just came to accept the fact that I always some boiler plate in my code.

However I‘m currently in the process of creating developer documentation to get more developers into XMPP. (For various XMPP libraries, not just babbler). One tutorial will basically be ‘create your own muc service’. And that again brought this to my attention. I try to keep code examples short and it feels very annoying that I have to disable managers first that would otherwise interfere with the proper workings of my component.

For example PresenceManager and EntityCapabiltiesManager. I can’t even think of a component where it would be useful to have them.

Or just look at the translation service example. I don’t see a logical reason for a component developer having to disable the muc namespace.

Wouldn’t it make more sense to start with no managers and no features and have the developer enable them themselves on a as-needed basis.

cheers

Daniel

sco0ter commented 3 years ago

Original comment by Christian Schudt (Bitbucket: sco0ter, GitHub: sco0ter).


Implement ExtensionProtocol on StreamInitiationManager and disable it by default

Partly addresses issue #155

→ <>