Is it possible to make a plugin framework, so that you can, in runtime, decide which of several plugins you want (not all these may exist at compile time for the host, and, may, even be made by someone else altogether).
I'll try to explain an example I've done in VB6, VB.Net and C#, just to try to explain what I mean.
In this example, I have a pretty typical administrative database frontend app. As with all such apps, one soon runs into very differing needs for import, export and reports. I don't want to recompile and redeploy everything just to deliver a report, so I made a plugin framework.
Basicially, the framework specifies two interfaces. The first is the same for all types of plugins, and is just how the plugin can present itself to the host and some basic plugin control (name, version, description, enabled). The second is the specific interface for this host interface.
So, for example, say that I want to add an export. What do I do?
I'll make the export as a DLL, which exposes two interfaces, the plugin interface and the export interface. In this case, the export interface would probably contain stuff like database connection, file name, options and so on.
Then, I just drop it in a plugins directory, where the host finds it, asks it about itself and, if needed calls it when an export is needed.
Now, I don't need anything exactly like that, but I'd like something which allows me to build a host, onto which I can, in runtime, attach modules (my own or third party). The plugin will need to be able to show UI in the activities of the host.
Possible?
Edit: I realize that the fact that B4A isn't fully object oriented will make it hard to do exactly as I described. It's not about how, it's about what I can do, so don't feel locked down.
I'll try to explain an example I've done in VB6, VB.Net and C#, just to try to explain what I mean.
In this example, I have a pretty typical administrative database frontend app. As with all such apps, one soon runs into very differing needs for import, export and reports. I don't want to recompile and redeploy everything just to deliver a report, so I made a plugin framework.
Basicially, the framework specifies two interfaces. The first is the same for all types of plugins, and is just how the plugin can present itself to the host and some basic plugin control (name, version, description, enabled). The second is the specific interface for this host interface.
So, for example, say that I want to add an export. What do I do?
I'll make the export as a DLL, which exposes two interfaces, the plugin interface and the export interface. In this case, the export interface would probably contain stuff like database connection, file name, options and so on.
Then, I just drop it in a plugins directory, where the host finds it, asks it about itself and, if needed calls it when an export is needed.
Now, I don't need anything exactly like that, but I'd like something which allows me to build a host, onto which I can, in runtime, attach modules (my own or third party). The plugin will need to be able to show UI in the activities of the host.
Possible?
Edit: I realize that the fact that B4A isn't fully object oriented will make it hard to do exactly as I described. It's not about how, it's about what I can do, so don't feel locked down.