Questions tagged [bpl]

Borland Package Library - special kind of object-oriented DLL with enforced type-safety

Delphi is component-based IDE for its proprietary dialect of Pascal language.
Differing from its competitor Visual Basic, it could "eat its own food" - create those components to extend itself.

Up to 1996 to install them one need to recompile part of IDE, similar to installation in Lazarus/FCL IDE. That resulted in two problems:

  • The more components you install - the heavier IDE becomes, and computers back then had significantly less memory. You could not arrange different components subsets per project.
  • If some component proved cruelly broken and crashed IDE, reconfiguring and rebuilding it without the component becomes less obvious task w/o using IDE.

It also made little help to deploy large programs: one either had to deploy large monolithic EXE which could cause problems in OSes with 16-bit kernel (Windows 9x/ME), or develop traditional Windows DLL sacrificing all type safety and complex types (passing objects and strings on EXE/DLL or DLL/DLL boundary would be extremely fragile, practically impossible for average programmer).

With the release of Delphi 3 in 1997 Borland introduced specific type of DLL, the one with enforced type safety (dependencies are codified at compile-time and checked at load time) and changed one letter: DLL -> DPL - Delphi Package Library.

Next year Borland C++ Builder 1 was released (with built-in Delphi 3.5) and those libraries were renamed again: DPL -> BPL - Borland Package Library.

BPL remains the basement for component-based RAD Studio IDE design up to today.

Drawbacks of BPL:

  • Increases "implementation leakage" problem of Turbo Pascal, source Units of which where introduced before OOP trend. That forces private members and datatypes (worker classes) used be promoted into public unit interface. Later Delphi language designer fixed the problem by introducing partial classes into C#, but in Delphi this feature is missing. Since BPL publishes all interface sections of all the contained units, even internal "worker" units, there is no way to make stable contained API and spaghetti dependencies may easily happen unnoticed.
  • Since every unit is public by definition - and since BPL may be re-used by other apps - the Smart Linker is defeated. If you only need 1% of the library - you either re-work it or you deploy the whole library with 99% of slab. In monolithic EXE mode compiler would record XRefs and the Smart Linker would eliminate unused 99% of the library.
  • This also means you can not have several unit with the same name, like you can with DLLs. It is not big issue but may be inconvenient.
  • This also means that if you re-work some class like adding new internal method (virtual or not) - the class signature changes and all the depending BPLs have to be re-compiled and re-deployed. It is especialyl annoying when you need some fix in stock RTL
  • If you change compiler options or version, this change affects internal classes/functions ABI and all dependent packages should be re-build and re-deployed.
101 questions
0
votes
0 answers

Delay Loaded Package with custom search path

I wrote a BPL project and added output .bpi file to another EXE project. The EXE project compiles and links well. The EXE runs well if I put .bpl file in the same folder as .exe file. However, the EXE fails to run if I put .bpl file in other folders…
odomchen
  • 45
  • 7
0
votes
1 answer

Unable to install bpl after building it in project upgraded from C++ Builder 2010 to C++ Builder 10 Seattle

I have a large project group I'm in the process of updating from C++ Builder 2010 to Seattle. So quite a jump :) I have run into several issues and managed to solve them all but yesterday I scratched my head a bit. One project builds a bpl used by…
inquam
  • 12,664
  • 15
  • 61
  • 101
0
votes
2 answers

Install Delphi Package get error for missing rtl170.bpl

currently I move a project from Delphi XE to XE8. We use a component but the most recent version is for XE3 so I take the code and change it until it compiles. Now I want to install the design time package, but I get the error that rtl170.bpl is…
Sebastian
  • 952
  • 1
  • 14
  • 41
0
votes
1 answer

Security of using .bpl as external modules

I'm still new with delphi and I developed an application that loads at runtime bpl files following this guide http://edn.embarcadero.com/article/27178 The bpl files will be in the same folder as the main app, and I was wondering what is the security…
FZ95
  • 97
  • 1
  • 8
0
votes
1 answer

Loading a form from a package at runtime

I am currently working on a few Plugin concepts and came across during my research on the use of dlls or BPls and I have now decided to use bpls. I would like to know when I have to use UnloadPackage (Package modules); best views because immediately…
Hidden
  • 3,598
  • 4
  • 34
  • 57
0
votes
1 answer

Delphi 2010 - Modular application, how to get class properties in the host app?

i did some tests about modular applications mechanism . the base thing i tried is load packages at run time and playing with classes inside it . my test was around building form in my package and load form "TCustOrder" from my host application the…
Realbitt
  • 388
  • 6
  • 18
0
votes
0 answers

Delphi XE4 IDE loading bpl very slow

Starting XE4 IDE usually takes a few seconds. Now I installed paxCompiler and loading paxComp_xe4.bpl takes about 40 sec. If I uninstall paxComp_xe4.bpl and load this bpl with code LoadPackage('C:\Users\Public\Documents\RAD…
Branko
  • 1,384
  • 1
  • 16
  • 35
0
votes
1 answer

List of loaded BPL plugins pretends empty, despite the package been actually loadeed

I have project group in Delphi XE2 which function is to load plugins from packages. I created these projects: PluginInterface.bpl – package with interfaces to plugins and to MainForm UClassManager.pas – plugins manager UPlugin.pas – plugins…
Danatela
  • 349
  • 8
  • 28
0
votes
3 answers

Loading BDE BPL from another directory

Using Delphi 2010 and a patched version of the BDE I run into a problem loading the BDERTL140.bpl. Loading DCLBDE140.bpl from another directory then usual works fine. Only when I want to load the BDERTL140.bpl, it always tells me that it has been…
Ralph M. Rickenbach
  • 12,893
  • 5
  • 29
  • 49
0
votes
1 answer

Delphi XE not finding a BPL

I'm having trouble in Delphi XE, I have a project which uses QRDesign (part of QuickReports). The error I'm getting when I view a unit that uses QRDesign is: "The program can't start because QRDBASE_DXE.bpl is missing from your computer. Try…
Alister
  • 6,527
  • 4
  • 46
  • 70
-3
votes
1 answer

Where can I find Delphi/Embarcadero redistributables

Even though I own a few Delphi versions, I got an executable missing, in this case, rtl190.bpl. I started looking for it, and concluded Embarcadero must have a peculiar redistribution policy, nothing like certain "runtime" downloads from other…
fidetrainerNET
  • 101
  • 1
  • 1
  • 7
1 2 3 4 5 6
7