PC Review


Reply
Thread Tools Rate Thread

ILMerge...Why?

 
 
Todd Carnes
Guest
Posts: n/a
 
      20th Jul 2008
I have read several threads regarding using ILMerge to combine all your
dlls with your exe to create one single exe file....I don't get it.

Why would you ever want to do this?

Todd
 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      20th Jul 2008
Todd Carnes wrote:
> I have read several threads regarding using ILMerge to combine all your
> dlls with your exe to create one single exe file....I don't get it.
>
> Why would you ever want to do this?


In most cases it is a bad idea, because you get multiple copies
of the code in DLL's which is against the fundamental idea of DLL's.

But it makes deployment slightly easier and in some cases that can
justify it.

Arne
 
Reply With Quote
 
 
 
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      20th Jul 2008
Todd,

>
> Why would you ever want to do this?
>

May I ask you this with a question.

Why would you never want to do this?

Cor
 
Reply With Quote
 
Todd Carnes
Guest
Posts: n/a
 
      20th Jul 2008
Cor Ligthert[MVP] wrote:
> Todd,
>
>>
>> Why would you ever want to do this?
>>

> May I ask you this with a question.
>
> Why would you never want to do this?
>
> Cor


Because I think it defeats the whole purpose of using dlls to begin
with. It seems like a step backwards to me. If you are going to stuff
all your code into one monolithic file, you might as well return to
using DOS as well.

But what do I know?

I thought the whole idea of dll's, as well as so's on Linux systems, was
that they could be unloaded from memory when not in use and that more
than one program can use them, thus saving disk space and saving time &
money (because you don't have to re-invent the wheel every time you
write a new program). Surely, once you've used ILMerge to squash
everything into one file this is no longer true, correct?

Todd
 
Reply With Quote
 
Todd Carnes
Guest
Posts: n/a
 
      20th Jul 2008
MC wrote:
> "Todd Carnes" <(E-Mail Removed)> wrote in message
> news:g5u24c$j6k$(E-Mail Removed)...
>> I have read several threads regarding using ILMerge to combine all your
>> dlls with your exe to create one single exe file....I don't get it.
>>
>> Why would you ever want to do this?

>
> To deliver your product as a single .exe file that does not need any other
> files or installation procedure. These are called "no-install programs" and
> are a very welcome development (or revival of an old idea).
>
>


Maybe I'm just being thick-headed here, but why is this "a very welcome
development"?

The whole idea off dll's is to get away from this. With a dll, if you
issue a bug fix for the dll, you only have to fix the dll and every
program that uses the dll gets the benefit of the fix. If you merge the
dll with your program, your program will be tied to that version of the
dll and you'll have to recompile your program every time a dll is changed.

Granted, I can think of one situation where this "might" be advantageous
(running the program from a portable media like a USB flash drive), but
I can think of several situations where this might be considered a bad idea.

Please understand, I am NOT trying to start an argument with this
question. I really don't see the benefit and am trying to understand.

Todd

 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      21st Jul 2008
Todd Carnes wrote:
> MC wrote:
>> "Todd Carnes" <(E-Mail Removed)> wrote in message
>> news:g5u24c$j6k$(E-Mail Removed)...
>>> I have read several threads regarding using ILMerge to combine all
>>> your dlls with your exe to create one single exe file....I don't get it.
>>>
>>> Why would you ever want to do this?

>>
>> To deliver your product as a single .exe file that does not need any
>> other files or installation procedure. These are called "no-install
>> programs" and are a very welcome development (or revival of an old idea).

>
> Maybe I'm just being thick-headed here, but why is this "a very welcome
> development"?
>
> The whole idea off dll's is to get away from this. With a dll, if you
> issue a bug fix for the dll, you only have to fix the dll and every
> program that uses the dll gets the benefit of the fix. If you merge the
> dll with your program, your program will be tied to that version of the
> dll and you'll have to recompile your program every time a dll is changed.
>
> Granted, I can think of one situation where this "might" be advantageous
> (running the program from a portable media like a USB flash drive), but
> I can think of several situations where this might be considered a bad
> idea.


Sometimes ease of deployment is the biggest priority.

Arne
 
Reply With Quote
 
J.B. Moreno
Guest
Posts: n/a
 
      21st Jul 2008
In article <g5vl8h$22g$(E-Mail Removed)>,
Todd Carnes <(E-Mail Removed)> wrote:

> Cor Ligthert[MVP] wrote:
> > Todd,
> >
> >>
> >> Why would you ever want to do this?
> >>

> > May I ask you this with a question.
> >
> > Why would you never want to do this?
> >
> > Cor

>
> Because I think it defeats the whole purpose of using dlls to begin
> with. It seems like a step backwards to me. If you are going to stuff
> all your code into one monolithic file, you might as well return to
> using DOS as well.


It's not a step backwards because dll's weren't a step forward -- they
were a solution to a problem that almost was....

> But what do I know?
>
> I thought the whole idea of dll's, as well as so's on Linux systems, was
> that they could be unloaded from memory when not in use and that more
> than one program can use them, thus saving disk space and saving time &
> money (because you don't have to re-invent the wheel every time you
> write a new program). Surely, once you've used ILMerge to squash
> everything into one file this is no longer true, correct?


You don't need DLL's to unload the code out of memory, and hard disk
space hasn't been an issue for anybody (including MS) since gigabyte
hard drives came out.

Back in the late 80's code size for major applications briefly
outstripped the available disk size when installed on on slightly older
systems. But in the last 20 years it's been the rare developer that
needed more hard drive space than was available on the average users
system. Today it's practically impossible to even get a user to think
about it.

Code reuse is a different matter, and in a way it's the saving grace of
DLLs. They limped along for a decade looking for a problem to solve,
one eventually came along -- the internet and interactive web page.

But unless you're working on a program that is going to have a web
based front end, or needs some other kind of distributed execution,
dlls just aren't of much benefit.

--
J.B. Moreno
 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      21st Jul 2008
J.B. Moreno,

As I would have written almost the same as you, I just want to add one word
near my opinion,

> dlls just aren't of much benefit


anymore.

:-)

Cor


 
Reply With Quote
 
Peter Morris
Guest
Posts: n/a
 
      21st Jul 2008
Dynamic loading is still a big benefit for plugin type systems.
 
Reply With Quote
 
Todd Carnes
Guest
Posts: n/a
 
      22nd Jul 2008
J.B. Moreno wrote:
> You don't need DLL's to unload the code out of memory, and hard disk
> space hasn't been an issue for anybody (including MS) since gigabyte
> hard drives came out.


I do see your point about the disk space, but just because you have
gigabytes of space available, doesn't mean you should use gigabytes of
space.

Also, although I can already hear the objections that will be raised on
this point, size DOES matter to those who want to download a program,
but are not fortunate enough to have access to super-fast internet
connections. Believe it or not there are still plenty of people out
there who are forced to either use a dial-up connection or not have
internet at all....

I know this because until recently I was one of those people who still
only had a 28k (not even 56k) dial-up connection because that was all
that was available where I lived. (LOL... Thank goodness, I moved.)

[snip]

> Code reuse is a different matter, and in a way it's the saving grace of
> DLLs. They limped along for a decade looking for a problem to solve,
> one eventually came along -- the internet and interactive web page.
>
> But unless you're working on a program that is going to have a web
> based front end, or needs some other kind of distributed execution,
> dlls just aren't of much benefit.
>


I don't work on programs with web-based front-ends, but I still use dlls
for code reuse. Why would I want to write the same code over and over
again when I can just write it once, store it in a dll and then use it
with as many programs as I want?

Todd

P.S. Thanks to everyone participating in this thread. I'm learning a
lot. (even if it might not seem like it at times <grin>)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:19 PM.