Hi there, I’m working on a charity project - it’s a social platform. Now I’m designing the Instant Messaging system.
I’ve decided to use OpenFire. After few hours of exploring the code. Thanks a lot for that ! Great job !
As we need a lot of cusomization (almost all these things could be solved by plugin), I have found one ugly thing.
I need custom roster - users are not allowed to change their roster, roster is loaded from db, but this has a different schema than ofRoster table. As it’s possible to change authentification of user management (custom db integration guide), I need the same stuff with rosters !
Unfortunately, I’m afraid, that with current design it’s not possible without hacking the core. I really don’t want to hack the nice OpenFire core.
All this stuff is done by RosterManager and RosterItemProvider respectively. The design of OpenFire is really well done. Everything is abstracted, but then, at the end, all module names are hard-coded in XMPPServer::loadModules(). Why ?
I hope, it could be done like that: (something like Dependency Injection)
// XMPPServer method loadModules()
private void loadModules() {
// Load boot modules
loadModule(JiveGlobals.getProperty("xmpp.module.rosterManager", RosterManager.class.getName()));
// ... other modules the same
}
With this design, it would really easy to extend any core module, without hacking the core - the new class would be in some plugin package.
What do you think about this idea ?
If I’m missing something, please let me know. Maybe there is a different way, how to implement something like custom rosters…
At the end, thanks again for OpenFire, you all did great job. It’s really well done !