Plugins system for Delphi application - bpl vs dll?

前端 未结 5 1835
离开以前
离开以前 2020-12-02 19:18

I\'m writing delphi app which should have capability of loading plugins. I\'m using JvPluginManager as plugin system/manager ;) Now, in the new plugin wizard they say it\'s

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 19:39

    I'm not familiar of JvPluginManager, but it depends on how you're going to use BPLs.

    Basically, BPL - is just a usual DLL, but its initialization/finalization work is stripped from DllMain to separate functions: 'Initialize'/'Finalize'.

    So, if you're going to use BPL like usual DLL, there are no cons that I'm aware of, only pros: there will be no more troubles with DllMain. That's all. The only difference.

    But BPL in Delphi also provide a convient way to share code. This means great advantages (common memory manager, no duplicated code, etc, etc). So usual BPL does a lot more than "being just a DLL". But this also means, that now your plugin system is limited to Delphi only (well, may be C++ Builder too). I.e. both plugins and exe MUST be compiled in the very same compiler to run smoothly.

    If this is acceptable for you (i.e. no MS Visual Studio, no, sir, never) - then go ahead, you can use all power of BPLs.

    P.S. But upgrading such BPLs plugins can be also a nightmare, if you do not design interface side carefully. In certain worst cases, you may need to recompile everything. P.P.S. Like I said: I have no idea, how it is applied to plugins, created by JvPluginManager.

提交回复
热议问题