Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
When should I go for 'exe' and when should I go for 'dll'..??
Can anyone tell that, what I can do only in 'dll' that I cannot do in 'exe'..
Posted
Comments
george4986 6-Oct-14 7:27am    
A simple solution is "It Depends on type of application".
I will tell u what i do (I develop ERP projects).
in case of ERP we need to incorporate many modules like Human resources,production,marketing,inventory,...
we devolep each module as seperate solutions,make them dlls.(plug and play modules as per client requirements)
refer these dlls to an application( if a client dont want a module we dont refer that module's dll in the application)
application contains client specific forms(requirements not asked by other clients) and
integration forms(entry and end point of modules).
if i have similar code in my form i change it to a function,
similar code in my application i change it to a class,
similar code/controls/functionality in my projects i change it to a dll.
the sole purpose of a function/class/dll is reusablilty.
but developing module wise dlls common for multiple clients is not easy,its a combined outcome of experiance,case studies,analysis,...

good luck ;-)

There is nothing that dll can do that exe cannot, you can reference both. But EXE commonly contains UI elements and user interactions while DLL contains various helper functions: data access layer, data models, collections, resources etc...things only indirectly dealing with the application.

Each exe commonly creates its own process while DLL is loaded into the calling process.

The advantage of dll is that it can easily be reused in multiple projects - for example, if you create your custom textbox, by referencing that single DLL containing the textbox you can have the same custom textbox in all your projects / applications.

Here is semi-formal definition[^]
 
Share this answer
 
Roughly speaking:
You write a DLL when you need a (dynamic linked) library, that is a bunch of binary code you may use in other applications.
An application, on the other hand, is executable code, self contained but not available to to other applications.
See, for instance, MSDN: "Dynamic-Link Libraries"[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900