Updated The birth of a python plugin architecture (markdown)

Lerking
2024-03-06 11:07:09 +01:00
parent c32cb9a0b2
commit e6638cd8c6
+5 -1
@@ -11,10 +11,14 @@ A. The plugin architecture design pattern (also known as microkernel) is a philo
Q. What is required of a plugin system? Q. What is required of a plugin system?
A. These elements must be in place for a basic plugin system. A. These elements must be in place for a basic plugin system.
- A core system which handles registration/unregistering - A core system which handles registration/unregistering and activation/deactivation of plugins.
- Some sort of configuration file with info about registered plugins. This could be any type of file for storing basic data i.e. json, xml, yaml etc. - Some sort of configuration file with info about registered plugins. This could be any type of file for storing basic data i.e. json, xml, yaml etc.
- Plugins using the plugin class as its main component. This ensures interface stability. - Plugins using the plugin class as its main component. This ensures interface stability.
My personal belief is that registration and activation should be kept separate.
- Registration should only register the plugin and hence tell the system that its ready for use.
- Once a plugin is registered, it should then be actively activated. i.e. the user activates the plugin for use.
- Activation should not be allowed unless the plugin is registered.
## Plugin requirements ## Plugin requirements
* Plugin registration (installation) * Plugin registration (installation)