Skip to main content

Friendica Developers reshared this.

Add-on refactoring

!Friendica Developers

So this are my first thoughs about the Addons:

  • Metadata about each add-on should be in an extra file, I would prefer something like addon.json
  • I would like to replace the whole Hook class with a proper Registration class, which is loaded when activating the Add-on. So we can remove the whole Hook table.
  • All Events in Friendica should be in an events.config.php with a proper description (maybe as constants?)
  • for legacy purpose, I would create a wrapper class like the LegacyModule class, which would execute the corresponding php-functions
  • I'm thinking about a giving each Event a specific interface (not knowing how tbh currently, maybe the corresponding interface setting as a value for the Event inside the events.config.php?), so each event and each add-on will know exactly what parameters and which result is necessary

This is it so far..

I would like to start with creating the events.config.php and replace all text with constants.. I think this is a non invasive behaviour, but gives some insights about the next steps

Unknown parent Friendica Developers reshared this.

Hypolite Petovan
The folder structure wonโ€™t change, but instead of a list of functions, addons will become classes.