Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi plugin framework

I want to design Delphi plugin framework. There are three options:
1. DLL
2. BPL
3. COM interface

Every option has some disadvantage.

DLL - Promblem with MDI apllication, forms from plugin cannot be embeded to the host exe - mdi application.
BPL - Every *.bpl plugin and *.exe host application must be compiled with the same version of Delphi.
COM - Interfaces {xxx-xx-xxx-xx} must be registered in system, (regsvr) So plugin framework cannot be portable!

Is everything true what I wrote above? If not, please correct me, or is there some other possibility?
thanks

like image 774
Peter Avatar asked Aug 20 '10 07:08

Peter


1 Answers

Yes, what you wrote is correct. All of these have advantages and disadvantages, the question is what is important for you, you didn't say what you want to do, so we can't tell you how to do it.

In general, I would pick BPL by default, use DLL if you need to use it from non Delphi apps, and pick COM only if you really have to.

The alternative is to not build your own, since there are several Delphi plugin frameworks available.

Also, this topic has been discussed here before, check out:

  • how-best-to-add-plugin-capability-to-a-delphi-program
  • plugins-system-for-delphi-application-bpl-vs-dll
like image 60
Daniel Maurić Avatar answered Sep 30 '22 16:09

Daniel Maurić