Architecture: future of model, users and groups

Hi everyone,

I’m opening a rather large brainstorming mainly to try to envision what we want in the future in terms of Maven architecture for xwiki-platform around the concepts of model, users and groups.

To contextualize I’m bringing up this brainstorming because I had an issue this morning because of a dependency: xwiki-platform-user-api currently depending on xwiki-platform-model-api. Currently this dependency exists because of a GroupManager interface that is part of xwiki-platform-user-api. Personally I don’t think this is accurate.

Conceptually I think API manipulating users and API manipulating groups should be well separated, this was already discussed in User and Group APIs and I still think a design such as:

  • wiki-platform-actor
    • xwiki-platform-actor-generic
      • xwiki-platform-actor-generic-*
    • xwiki-platform-actor-user
      • xwiki-platform-actor-user-*
    • xwiki-platform-actor-group
      • xwiki-platform-actor-group-*

would be more accurate.

Now another related question is about xwiki-platform-model-api in my case the issue was that I introduced a dependency to xwiki-platform-user-api in it because I needed to use UserReference in the model API.

The way I see it, we want xwiki-platform-oldcore to decrease and so we want in the future to refactor it by creating new components for the model which will use the UserReference since it should be our new standard API to manipulate user. And for me those APIs should take place in xwiki-platform-model-api.

Now maybe the problem is that xwiki-platform-model-api currently contains all the references that are used everywhere such as DocumentReference, so maybe in the future we should create a dedicated xwiki-platform-model-references to hold the document references only without the model APIs. It might avoid the cyclid dependencies like the one I got this morning.

So wdyt, do we share the same vision, or is it something completely different for you?