[Gambas-user] How to create a plugin system for your Gambas project

Bruce Steers bsteers4 at gmail.com
Thu Feb 18 15:37:43 CET 2021


On Wed, 17 Feb 2021 at 18:56, olivier coquet <ocoquet at 3d-phenomen.fr> wrote:

> Hello Benoit and the others,
>
> First of all thank you for your interest in the plugin system, I
> wouldn't have imagined that it could interest anyone else than me :)
>
> For the points you mention:
>
> 0) It seems to me that a guide-line would be appropriate for plugins to
> be easily recognized.
>

So do it.  doesn't look like anyone here will.



> 1) I don't agree with absolutepath, I prefer by far my system that loads
> plugins in the components directory. This way their installation is
> simple (installation package) and this directory is kept up to date in
> the gambas system without uncertain manipulation.
>

Gambas only wants to deal with absolute paths , it's clearly documented.



> 3) The I disagree with you, what you describe is a component, by nature
> a plugin acts on the main program but it is unknown to it. Said in
> another way, the main program cannot/must not access the functions and
> procedures of the plugin except for the initialization procedure which
> must be identical in all plugins.
> PS: For someone who hasn't read the current thread, did the name main()
> suddenly appear to you? :)
>
> 4) same as for #4, no need to have the list of exported classes, the
> main program doesn't need to know them.
>
> To sum up, this is what I expect from a plugin and what I realized in
> the recently posted example:
>
> A plugin must not disrupt the operation of a stable main program.
> A plugin must be able to "hijack" some of the functions of the main
> program.
> A plugin should be able to change the appearance of the windows of the
> main program in order to improve them or to add functions to them.
> Last but not least: The main program must be able to work correctly if
> the plugin is absent and this without specific detection code (which
> argues in favour of my remark on point n° 3).
>
> In my mind, a plugin is an additional, different or improved function
> added to the main program after the main program has been designed.
> These additional functions and improvements could not be foreseen at the
> time of the creation of the main program.
>
> If you want a concrete example, I advise you to take a look at the
> example I posted here which illustrates 100% what I'm talking about.
>

Not sure anyone really wants to.(we're all a bit busy doing our own things)
Make a plugin system Oliver.
You seem to want to do things differently to how gambas works so don't
expect it to be adopted by gambas.
But that's fair enough, If your plugin system is good then maybe it will
take off?
At least it will work for you in every way you expect it to

BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210218/c8659cd0/attachment.htm>


More information about the User mailing list