Reputation: 2060
I look after a suite of over 100 delphi (XE2) projects which are currently all built without packages. Several executables and DLLs include some large third-party component sets which add several megabytes to their size. Our installer has gone up to over 100MB, with a few executables over 10MB, several around 4MB, and a lot between 1 and 2 MB. I am considering using packages for some of the third-party components and the VCL. In general, visual components are only used from the executables, not the DLLs. The DLLs must remain DLLs, because some are called from other languages.
What are the main considerations and dangers to be aware of if we switch to use packages? What might break? Will it affect the convenience of debugging, testing, building (with FinalBuilder), or maintenance? Will run-time memory utilization increase unacceptably, because we will be loading whole BPLs at run-time instead of just the units needed by the linker?
I am aware that the only true answer will come from trying it with our specific applications, but I would greatly appreciate some advice from anyone who has either been down this path, or turned away from it.
Upvotes: 0
Views: 152
Reputation: 69082
I avoid Runtime BPLs like the plague. Here are the reasons:
A. You need to think about versioning. What happens when someone updates ONE BPL or EXE and not the others.
B. You need to think about DLL hell. What is your path, and are all the pieces of your application in the same folder, or will they be in directories on the path?
C. You need to think about the possibility that one or more file will be missing at runtime. This usually results in a broken application. Some people actually use this to good effect (some customers who have not paid for feature X do not even receive that BPL) but mostly, this is just another source of trouble.
D. In the unlikely event that you need to fix a bug in the VCL sources, do you really want to add rebuilding the VCL BPLs to your list of Fun Maintenance Programming Activities?
E. In one large BPL-based application that I worked in, I found that the main EXE and all its plugin BPL sub-parts, opened in one project group resulted in Delphi (XE at the time) being substantially less stable (crashing more) than when I loaded similarly large, but single-executable projects. IDE issues are not unheard of, especially where dependencies between multiple items in a project group happen.
Whenever the notion of using packages comes up, I find that a good stiff drink, and an 8 hour break from programming usually suffices.
Upvotes: 1