Edgewall Software

Changes between Version 29 and Version 30 of TracDev/ComponentArchitecture


Ignore:
Timestamp:
May 26, 2014, 12:03:15 AM (10 years ago)
Author:
anonymous
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/ComponentArchitecture

    v29 v30  
    215215      # implementation stuff here
    216216  }}}
    217   Abstract components can't be enabled and therefor don't appear in the plugin panel of Trac's web interface.
    218 * Not all components require to be enabled to work properly. ''Only'' components implementing an extension point interface (using `implements`) need to be enabled and therefor listed in the `entry_points` section of a plugin. If you just want to have the utility class (like a database manager) that takes the benefits of a component (like being a singleton and/or having access to Trac's database or configuration) that doesn't implement any extension point interfaces, it doesn't need to be enabled (or even listed in the `entry_points` section). Such a component should then be marked "abstract".
     217  Abstract components can't be enabled and therefore don't appear in the plugin panel of Trac's web interface.
     218* Not all components require to be enabled to work properly. ''Only'' components implementing an extension point interface (using `implements`) need to be enabled and therefore listed in the `entry_points` section of a plugin. If you just want to have the utility class (like a database manager) that takes the benefits of a component (like being a singleton and/or having access to Trac's database or configuration) that doesn't implement any extension point interfaces, it doesn't need to be enabled (or even listed in the `entry_points` section). Such a component should then be marked "abstract".
    219219* Components should be listed in the `entry_points` section, if they define any options (from `trac.config`). This way `trac.ini` editors can find this option even if it still has its default value. Options are registered when the component is registered. The component that defines the option doesn't need to be enabled for the option to be registered and can even be abstract.
    220220