Feature Wiki

Information about planned and released features

Tabs

Components: ServiceProvider / ServiceConsumer Registration

1 Requirements

The service.xml/module.xml information is currently used for the registration of relations between components. Most times a) one component defines some sort of interface (not necessarily by using PHP interfaces) and b) another component declares the use/support of such an interface. Since this data is stored in the database, components in group a) can quickly determine all components that use or support their interfaces.

The current problem is, that there is no common way to declare these relations. Instead there are different tags like "baseclasses", "objects", "copage", "web_access_checker", "logging" and so on. This proposal suggest to use only one "generic" tag.

Example 1

Services/Administration/service.xml contains

<baseclasses>
<baseclass name="ilAdministrationGUI" dir="classes" />
</baseclasses>

This would be changed to =>

<implements component="Services/UICore" interface="Ctrl" dir="classes" />

Example 2

Services/User/service.xml contains

<objects>
<object id="usr" class_name="User" dir="classes"
checkbox="1" inherit="0" translate="0" rbac="0">
</object>
<object id="usrf" class_name="UserFolder" dir="classes"
checkbox="0" inherit="1" translate="sys" rbac="1" system="1" administration="1">
<subobj id="usr">usr</subobj>
<parent id="adm" max="1">adm</parent>
</object>
</objects>

This would be changed to =>

<comp>
<implements component="Services/User" interface="ActionContext" dir="Gallery/classes" classbase="Gallery"/>
</comp>

All other information contained in the XML (subtags, attributes, ...) could be moved to be delivered by PHP objects that implement a certain interface that allows to gather this information. This would enable all information to be runtime-dependent and not static XML anymore.

We would not need to expand the sax parser for the xml files anymore. Generic methods in Service/Component could deliver information on what component uses/supports interfaces of other components.

The actual tag names and attributes (here "implements"/"interface") should be discussed.

Interface provider can get a list of consuming components by:

$cons = ilComponent::getInterfaceImplementers("Services/User", "ActionContext");

2 Additional Information

  • Idea / concept: Alex Killing
  • Interest in funding: Leifos (partly / no complete migration)
  • Maintainer: tbd
  • Implementation of the feature is done by (will be set by Jour Fixe / maintainer)
  • Testcases by: (please add your name if you want to create the testcases for this feature)

3 Discussion

JourFixe, ILIAS [jourfixe]: Alexander gave a short presentation of this concept and invites all developers to think about this concept and to add comments and ideas to the feature wiki page. Topic will be handled again on the next Jour Fixe at November 07.

JourFixe, ILIAS [jourfixe], April 24, 2017: We highly appreciate this suggestion. Alexander will revise parts of the concept and provide more examples to clarify the concept.

4 Implementation

{please give a description of the final implementation and add screenshots if possible}

Test Cases

Test cases completed at {date} by {user}

  • {Test case number linked to Testrail} : {test case title}

Approval

Approved at {date} by {user}.

Last edited: 24. Apr 2017, 15:41, Kunkel, Matthias [mkunkel]