Why SHOULD I use DLL's? - Need Reasons
Cash GEDNY -- ccoyne@equityny.ml.com
Monday, March 31, 1997
Environment: NT 3.51 Visual C++ 4.0
I'm working on a project that will grow to have multiple applications. I
think we should use DLL's, others disagree. I need some arguments to sway
them.
What their arguments are:
All apps will run on Pentium Pros with 3 gig hard drives, 64 meg RAM, Win
NT3.51 (eventually 4.0)
The only other apps that will be running on these boxes are MS-Excel doing
heavy calcs, and MS-Word.
These apps are modstly for display purposes, with data coming over a TCP/IP
connection.
Each app might use a couple 100K of data space at any one time.
With all that RAM in addition to virtual memory, why do we need to use
DLL's.
Apps will be about 200K code.
They'll just statically link everything into each app.
Anyone have any comments in the PRO DLL court (or even CON DLL)?
TIA,
C Coyne
ccoyne@gedny.ml.com
Ravikumar V -- rvmallel@IGI.INDIA.INGR.com
Tuesday, April 01, 1997
[Mini-digest: 15 responses]
Hi Coyne,
Apart from the saving of disk space & RAM, usage of DLLs provide the
following key benefits:
* They promote code reuse through logical and physical modularization.
* They allow modular, seamless upgrading of a program because one or
more DLLs can be replaced with newer versions. You do not have to
rebuild an entire application.
* DLLs greatly benefit localization. By placing
language-specific information into DLLs, the application can
simply load the appropriate language DLL to retrieve information.
Mallela V. Ravikumar
>----------
>From: Coyne, Cash ( GEDNY)[SMTP:ccoyne@equityny.ml.com]
>Sent: Tuesday, April 01, 1997 3:43 AM
>To: 'mfc-l@netcom.com'
>Subject: Why SHOULD I use DLL's? - Need Reasons
>
>Environment: NT 3.51 Visual C++ 4.0
>
>I'm working on a project that will grow to have multiple applications. I
>think we should use DLL's, others disagree. I need some arguments to sway
>them.
>
>What their arguments are:
>All apps will run on Pentium Pros with 3 gig hard drives, 64 meg RAM, Win
>NT3.51 (eventually 4.0)
>The only other apps that will be running on these boxes are MS-Excel doing
>heavy calcs, and MS-Word.
>These apps are modstly for display purposes, with data coming over a TCP/IP
>connection.
>Each app might use a couple 100K of data space at any one time.
>With all that RAM in addition to virtual memory, why do we need to use
>DLL's.
>Apps will be about 200K code.
>They'll just statically link everything into each app.
>
>Anyone have any comments in the PRO DLL court (or even CON DLL)?
>
>TIA,
>
>C Coyne
>ccoyne@gedny.ml.com
>
>
>
>
-----From: Mike Lastort
Coyne, Cash ( GEDNY) wrote:
>
> Environment: NT 3.51 Visual C++ 4.0
>
> I'm working on a project that will grow to have multiple applications. I
> think we should use DLL's, others disagree. I need some arguments to sway
> them.
You're kidding, right? This question can be answered in any beginner's
Windows programming textbook. Yours does not seem to be an appropriate
topic for discussion in an "advanced" MFC programming forum. You don't
even discuss the ramifications of an MFC versus a non-MFC application.
This would also be inappropriate, but slightly more relevant.
Also, if I was on a team that did not see the reasons for using DLLs
when righting a suite of Windows apps, I'd be getting my resume ready.
:)
--
----------------------------------------------------------------
| | "There's so much comedy on tele- |
| Mike Lastort | vision. Does that cause comedy in |
| lastort@idsonline.com | the streets?" |
| | - Dick Cavett |
----------------------------------------------------------------
-----From: "jeremy.farr@bandw.co.uk"
Pro DLL
a even a currently good machine may bend under the pressure
b windows offers the technology, why not use it?
c DLLs can be used directly from Excel etc, so you can speed
up/extend/simplify
your VBA code.
What are their reasons for not wanting DLLs?
Jerry Farr
----------
To: -:"'mfc-l/B&W @
netcom.com'"
@ UUCP, jeremy farr @ bwuk
cc:
From: SE:ccoyne @ equityny.ml.com @ UUCP
Date: 01/04/97 11:30:18
Subject: Why SHOULD I use DLL's? - Need Reasons
Environment: NT 3.51 Visual C++ 4.0
I'm working on a project that will grow to have multiple applications.
I
think we should use DLL's, others disagree. I need some arguments to
sway
them.
What their arguments are:
All apps will run on Pentium Pros with 3 gig hard drives, 64 meg RAM,
Win
NT3.51 (eventually 4.0)
The only other apps that will be running on these boxes are MS-Excel
doing
heavy calcs, and MS-Word.
These apps are modstly for display purposes, with data coming over a
TCP/IP
connection.
Each app might use a couple 100K of data space at any one time.
With all that RAM in addition to virtual memory, why do we need to use
DLL's.
Apps will be about 200K code.
They'll just statically link everything into each app.
Anyone have any comments in the PRO DLL court (or even CON DLL)?
TIA,
C Coyne
ccoyne@gedny.ml.com
-----From: "Coyne, Cash ( GEDNY)"
The biggest reason is from the standpoint of keeping the number of deliverable files to a minimum.
----------
From: jeremy.farr@bandw.co.uk[SMTP:jeremy.farr@bandw.co.uk]
Sent: Tuesday, April 01, 1997 7:41 AM
To: Coyne, Cash ( GEDNY)
Cc: 'mfc-l/B&W@netcom.com'
Subject: Re: Why SHOULD I use DLL's? - Need Reasons
Pro DLL
a even a currently good machine may bend under the pressure
b windows offers the technology, why not use it?
c DLLs can be used directly from Excel etc, so you can speed up/extend/simplify
your VBA code.
What are their reasons for not wanting DLLs?
Jerry Farr
----------
To: -:"'mfc-l/B&W @
netcom.com'"
@ UUCP, jeremy farr @ bwuk
cc:
From: SE:ccoyne @ equityny.ml.com @ UUCP
Date: 01/04/97 11:30:18
Subject: Why SHOULD I use DLL's? - Need Reasons
Environment: NT 3.51 Visual C++ 4.0
I'm working on a project that will grow to have multiple applications. I
think we should use DLL's, others disagree. I need some arguments to sway
them.
What their arguments are:
All apps will run on Pentium Pros with 3 gig hard drives, 64 meg RAM, Win
NT3.51 (eventually 4.0)
The only other apps that will be running on these boxes are MS-Excel doing
heavy calcs, and MS-Word.
These apps are modstly for display purposes, with data coming over a TCP/IP
connection.
Each app might use a couple 100K of data space at any one time.
With all that RAM in addition to virtual memory, why do we need to use
DLL's.
Apps will be about 200K code.
They'll just statically link everything into each app.
Anyone have any comments in the PRO DLL court (or even CON DLL)?
TIA,
C Coyne
ccoyne@gedny.ml.com
-----From: "Kenneth A. Argo"
1) Just because you have a large amount of resource is no excuse to be =
sloppy; one day you may wish you had more resource and it will be too =
late. This is what happened in the past, developers get lazy about =
creating good applications because there is plenty of memory and hard =
drive space. However load time and execution time is what the user sees =
more readily. If a competitor came out with a similar application that =
loaded 10 times faster it may have an impact on your sales.
2) Placing common routines within a DLL results in code that is more =
manageable, more easily debugged, validation, easier to distribute new =
or corrected code. This has been proven by the trend in modular design =
methods.
a) Manageable - Since there would be a single code base for common =
components you only need to work with one, not many instances of the =
same thing.
b) Debugging - See above.
c) Distribution - Depending on how you decide to create such components =
it would be possible to distribute bug fixes that can instantly fix a =
variety of problems on many applications with a relative small amount of =
media. Image fixing a piece of common code that resides within 5 =
applications, you would have to rebuild and revalidate all 5, then =
redistribute all 5, that's a lot of media and shipping cost.
d) Validation - Technically the validation team can begin testing a =
module or DLL once it has been completed. While this does not relieve =
the process of validating the entire application it does give validation =
a head start on the task which shortens the final application =
validation.
3) I went through this same discussion with my team when I started here. =
There where a number of us that where module centric developers, =
including my VP. If actually took an order from our boss to do things =
this way. I can tell you that after about 1 year of this type of =
development you would be hard pressed to find anyone that would go back.
4) Development of modules allows for projects to be more easily divided =
into sub-developments.
Ken
-----Original Message-----
From: Coyne, Cash ( GEDNY) [SMTP:ccoyne@equityny.ml.com]
Sent: Monday, March 31, 1997 5:14 PM
To: 'mfc-l@netcom.com'
Subject: Why SHOULD I use DLL's? - Need Reasons
Environment: NT 3.51 Visual C++ 4.0
I'm working on a project that will grow to have multiple applications. =
I=20
think we should use DLL's, others disagree. I need some arguments to =
sway=20
them.
What their arguments are:
All apps will run on Pentium Pros with 3 gig hard drives, 64 meg RAM, =
Win=20
NT3.51 (eventually 4.0)
The only other apps that will be running on these boxes are MS-Excel =
doing=20
heavy calcs, and MS-Word.
These apps are modstly for display purposes, with data coming over a =
TCP/IP=20
connection.
Each app might use a couple 100K of data space at any one time.
With all that RAM in addition to virtual memory, why do we need to use=20
DLL's.
Apps will be about 200K code.
They'll just statically link everything into each app.
Anyone have any comments in the PRO DLL court (or even CON DLL)?
TIA,
C Coyne
ccoyne@gedny.ml.com
-----From: Colin Angus Mackay
Some pro DLL arguments:
1. Code re-use - Many apps can share the same code without duplicating =
it.
2. Bug fixing - If a bug is found in a module (which is self-contained =
within a DLL) the bug can be fixed and everything that links to that DLL =
will instantly have the fix - and you only recompile one thing (the DLL)
3. The more applications you have the more disk space will be saved by =
linking to DLLs. MFC40.DLL is about 900K, how much of MFC are you going =
to use in each app, how many app are you creating. You may find it =
better to use the DLL.
4. Are any of your apps going to be run at the same time? If so then =
linking to a DLL and having only one copy of the code in memory would be =
more efficient.
5. Throwing hardware at a problem is not necessarily the best solution.
6. Better Project Management - Creating your own DLLs would mean that =
you can more easily break down the project to give tasks to people or =
teams to do. Each team works on a specific DLL.
7. Less often used DLLs can be loaded only when required saving memory =
while not in use.
Colin.
-----From: Nayab Khan
Here are some of my points:
1. DLLS are faster to load.
2. DLLs work in the same address space as the EXE
application and therefore it is easier to share
data between a DLL and an EXE. The new memory
modal/address spacing makes it difficult for 32bit
apps to share data between EXEs (there is no clean
way)
3. DLLs has less memory overhead.
4. DLLs lifetime is limited to the parent
application.
5. DLLs don't require a separate thread or
a main window.
6. If multiple applications uses a DLL the memory
usage is very efficient since the code segament is
common.
>>> "Coyne, Cash ( GEDNY)"
03/31/97 04:13pm >>>
Environment: NT 3.51 Visual C++ 4.0
I'm working on a project that will grow to have
multiple applications. I
think we should use DLL's, others disagree. I
need some arguments to sway
them.
What their arguments are:
All apps will run on Pentium Pros with 3 gig hard
drives, 64 meg RAM, Win
NT3.51 (eventually 4.0)
The only other apps that will be running on these
boxes are MS-Excel doing
heavy calcs, and MS-Word.
These apps are modstly for display purposes, with
data coming over a TCP/IP
connection.
Each app might use a couple 100K of data space at
any one time.
With all that RAM in addition to virtual memory,
why do we need to use
DLL's.
Apps will be about 200K code.
They'll just statically link everything into each
app.
Anyone have any comments in the PRO DLL court (or
even CON DLL)?
TIA,
C Coyne
ccoyne@gedny.ml.com
-----From: Regis NICOLAS
At 05:13 PM 3/31/97 -0500, you wrote:
>Environment: NT 3.51 Visual C++ 4.0
>
>I'm working on a project that will grow to have multiple applications. I
>think we should use DLL's, others disagree. I need some arguments to sway
>them.
>
>What their arguments are:
>All apps will run on Pentium Pros with 3 gig hard drives, 64 meg RAM, Win
>NT3.51 (eventually 4.0)
>The only other apps that will be running on these boxes are MS-Excel doing
>heavy calcs, and MS-Word.
>These apps are modstly for display purposes, with data coming over a TCP/IP
>connection.
>Each app might use a couple 100K of data space at any one time.
>With all that RAM in addition to virtual memory, why do we need to use
>DLL's.
>Apps will be about 200K code.
>They'll just statically link everything into each app.
>
>Anyone have any comments in the PRO DLL court (or even CON DLL)?
>
>TIA,
>
>C Coyne
>ccoyne@gedny.ml.com
>
>
>
>
I think you SHOULD use DLL. Here are some reasons:
1- If the set of procs you want to put in a DLL is used by many
applications and you want to correct a bug in (or change) one of this proc,
you just need to do it in the DLL and provide a new version of it. All
applications will be updated.
2-About physical memory (not virtual):
With DLL the physical mem will contain:
System
DLL Code (x bytes)
App1 Code (y1 bytes)
App1 Data
App2 Code (y2 bytes)
App2 Data
Total: (System+App1Data+App2Data)+x+y1+y2
Without DLL:
System
App1 Code (x+y1) (as DLL is statically linked)
App1 Data
App2 Code (x+y2)
App2 Data
Total: (System+App1Data+App2Data) + 2*x + y1 + y2
In fact in the first case you will need only x bytes of physical mem and
without DLL n*x where n is the number of different apps (not the number of
instance of an app) using this DLL. Minimizing the need of physical memory
reduces swapping in/out of pages while changing of apps.
3-Disk space (even if a disk is very very big, it is not infinite).
4-Distribution of your app on Internet. Your installation image will be
smaller as common code is only in the DLL.
5-Application loading time (If the DLL is in memory the second instance or
the second app using it will load faster)
There are some drawbacks but you dont ask them :-)
Hope this helps,
Regis
------------------------------
Regis NICOLAS - R&D Windows
Smartcode Technologie
mailto:nicolas@smartcode.fr
http://www.smartcode.fr/
http://www.smartcodesoft.com/
Tel.: (33) (0)4 67 59 30 16
-----From: Nayab Khan
Here are some of my points:
1. DLLS are faster to load.
2. DLLs work in the same address space as the EXE
application and therefore it is easier to share
data between a DLL and an EXE. The new memory
modal/address spacing makes it difficult for 32bit
apps to share data between EXEs (there is no clean
way)
3. DLLs has less memory overhead.
4. DLLs lifetime is limited to the parent
application.
5. DLLs don't require a separate thread or
a main window.
6. If multiple applications uses a DLL the memory
usage is very efficient since the code segament is
common.
>>> "Coyne, Cash ( GEDNY)"
03/31/97 04:13pm >>>
Environment: NT 3.51 Visual C++ 4.0
I'm working on a project that will grow to have
multiple applications. I
think we should use DLL's, others disagree. I
need some arguments to sway
them.
What their arguments are:
All apps will run on Pentium Pros with 3 gig hard
drives, 64 meg RAM, Win
NT3.51 (eventually 4.0)
The only other apps that will be running on these
boxes are MS-Excel doing
heavy calcs, and MS-Word.
These apps are modstly for display purposes, with
data coming over a TCP/IP
connection.
Each app might use a couple 100K of data space at
any one time.
With all that RAM in addition to virtual memory,
why do we need to use
DLL's.
Apps will be about 200K code.
They'll just statically link everything into each
app.
Anyone have any comments in the PRO DLL court (or
even CON DLL)?
TIA,
C Coyne
ccoyne@gedny.ml.com
-----From: "Thijs van Rijswijk"
----------
> Van: Coyne, Cash ( GEDNY)
> Aan: 'mfc-l@netcom.com'
> Onderwerp: Why SHOULD I use DLL's? - Need Reasons
> Datum: dinsdag 1 april 1997 0:13
>
> Environment: NT 3.51 Visual C++ 4.0
>
> I'm working on a project that will grow to have multiple applications. I
> think we should use DLL's, others disagree. I need some arguments to
sway
> them.
>
> What their arguments are:
> All apps will run on Pentium Pros with 3 gig hard drives, 64 meg RAM, Win
> NT3.51 (eventually 4.0)
> The only other apps that will be running on these boxes are MS-Excel
doing
> heavy calcs, and MS-Word.
> These apps are modstly for display purposes, with data coming over a
TCP/IP
> connection.
> Each app might use a couple 100K of data space at any one time.
> With all that RAM in addition to virtual memory, why do we need to use
> DLL's.
> Apps will be about 200K code.
> They'll just statically link everything into each app.
>
> Anyone have any comments in the PRO DLL court (or even CON DLL)?
>
> TIA,
>
> C Coyne
> ccoyne@gedny.ml.com
>
Sure you better should use DLL's because:
your executables are smaller
Dll's are only in memory if you need them
if you write one good DLL you can use it in different programs (or are you
copying everthing each time from program to program)
and there are lots of reasons
the other side can be:
Programs are running a bit slower if you use a lot of DLL's (because
dynamicly loading it)
If you want the use own DLL's take care of not programming little routs in
it.
Greetings,
Thijs
-----From: Bob Clarke
Ease of maintenance comes to mind right away. If you need to make a
change to a module that occurs in all apps, why go through the extra
bother of making sure the change is properly made in all apps when you
can do it just once and put out the new DLL?
>----------
>From: Coyne, Cash ( GEDNY)[SMTP:ccoyne@equityny.ml.com]
>Sent: Monday, March 31, 1997 3:13 PM
>To: 'mfc-l@netcom.com'
>Subject: Why SHOULD I use DLL's? - Need Reasons
>
>Environment: NT 3.51 Visual C++ 4.0
>
>I'm working on a project that will grow to have multiple applications. I
>think we should use DLL's, others disagree. I need some arguments to sway
>them.
>
>What their arguments are:
>All apps will run on Pentium Pros with 3 gig hard drives, 64 meg RAM, Win
>NT3.51 (eventually 4.0)
>The only other apps that will be running on these boxes are MS-Excel doing
>heavy calcs, and MS-Word.
>These apps are modstly for display purposes, with data coming over a TCP/IP
>connection.
>Each app might use a couple 100K of data space at any one time.
>With all that RAM in addition to virtual memory, why do we need to use
>DLL's.
>Apps will be about 200K code.
>They'll just statically link everything into each app.
>
>Anyone have any comments in the PRO DLL court (or even CON DLL)?
>
>TIA,
>
>C Coyne
>ccoyne@gedny.ml.com
>
>
>
>
-----From: Stuart Downing
Advantages of a DLL
* Smaller total memory footprint when multiple DLL clients are loaded
simultaneously
* Updates to user sites may require replacement of fewer components. (If
bug is in DLL, can just ship user new DLL, not whole collection of
EXE's)
Disadvantages of a DLL
* Longer load time
* Potential versioning problems - Change to DLL interface requires
change to all DLL clients using that interface. (This is just as true
for static libraries, but you may be able to have a client of a static
library continue to use an older version of the library, whereas with a
DLL, all DLL clients must comply with the new interface once that DLL
has been loaded on the user's machine)
* Corollary to above - Increased maintenance costs
It's not cut and dried that the use of DLLs is always better. You have
to consider the advantages and disadvantages as they apply to your
particular circumstances. In your case, several 200K apps plus Word and
Excel running on a machine with 64M of RAM - you might be doing yourself
a favor to just statically link. You can always consider converting the
static library to a DLL later on.
-----
Stuart Downing
sdowning@fame.com
FAME Information Services, Inc.
-----From: JPetrous@teleweb.net (Jerrfey Petrous)
At 05:13 PM 3/31/97 -0500, you wrote:
>Environment: NT 3.51 Visual C++ 4.0
>
>I'm working on a project that will grow to have multiple applications. I
>think we should use DLL's, others disagree. I need some arguments to sway
>them.
>
One reason is the idea of sharing code. If any of these apps will be using
functions that are the same, do you want to have to make sure each app gets
maintained properly when a function changes ?
Jeff
-----From: "Leo Wu"
--0__=5yghd2w29Pe3Q1j6qgiuV3qioxyxIZHq14LLCVNKUGWlBvcKGoLKymfk
Content-type: text/plain; charset=us-ascii
(Embedded (Embedded image moved to file:
image moved to PIC02376.PCX)
file: Leo Wu @ UNISYS
PIC26834.PCX) (Embedded image moved to file:
PIC12167.PCX)
04/01/97 02:32:49 PM
(Embedded image moved to file:
PIC29141.PCX)
> Environment: NT 3.51 Visual C++ 4.0
What reason prevents you from VC4.2b?
> I'm working on a project that will grow to have multiple applications. I
think we should > use DLL's, others disagree. I need some arguments to
sway them.
Have you considered OLE (common API flavor)?
> They'll just statically link everything into each app.
If you never change environment and never change development tools, go
ahead.
Or you may just want it to be a temporary project.
> Anyone have any comments in the PRO DLL court (or even CON DLL)?
put your service functionality into .dll. or .ocx
-----From: Barry Tannenbaum
At 05:13 PM 3/31/1997 -0500, you wrote:
> Environment: NT 3.51 Visual C++ 4.0
> I'm working on a project that will grow to have multiple applications. I
> think we should use DLL's, others disagree. I need some arguments to sway
> them.
Pro DLL: You images will be smaller, so there's fewer floppies to make.
Con DLL: You may be hurt by other applications overwriting your DLLs. We
install copies of the DLLs we need into our own directory and don't put
anything in the system directory for this reason.
- Barry
--------------------------------------------------------------------------------
3DV Technology, Inc Phone: (603) 595-2200 X228
410 Amherst St., Suite 150 Fax: (603) 595-2228
Nashua, NH 03063 Net: barry@dddv.com
Become an MFC-L member
| Вернуться в корень Архива
|