DEV Community

Cover image for What is a DLL in Web Development?
Milecia
Milecia

Posted on • Updated on

What is a DLL in Web Development?

At some point in your journey as a web developer, you'll end up doing something with the DLL files. It's really not as bad as it might sound. You just need a little understanding about how they work and what they are used for.

First off, DLL stands for dynamic link library. These files just hold instructions that other programs can use to do different things. That means multiple programs can use this same code at the same time in different ways. It saves you a lot of time as a developer.

That's how you are able to use different libraries and NuGet packages across all of your projects. Any time you have installed a new library or NuGet package, you've added a new DLL to the project that holds the code or data you need.

These files might seem simple and they can be, however they are more powerful than they seem. You usually won't have access to the code inside of the file unless and you normally don't want to make any changes to it anyways.

DLL files use languages like C or C++, although you'll see C++ more often. You can write your own DLLs to run some code you need if you're willing to learn how to do it. It could be valuable to your project and of course it could make you look good in return.

The good thing is that it is extraordinarily unlikely that you'll ever have to write a DLL file from scratch. What is likely is the chance a DLL file will cause some errors in your code.

Those NuGet packages and libraries that you'll use on your projects have their own DLL files. Problems sometimes pop up when there are version changes and you end up with an old or incompatible copy of the DLL file of that particular library.

What typically happens is one of your DLL files is dependent on another. When the independent file has an outdated version, but the dependent file is up to date, you'll start seeing obscene amounts of red text in your development window. After you've gone through all of your regular debugging steps (debugging guide), it might be time to take a look here.

Make sure all of your package and library versions are up to date and compatible before you try to dig into the DLL files. If all of the updates and installs in the world won't fix it, then it's either something else (most likely) or it's time to roll up your sleeves and work through the DLL code.

I hope that you have a better understanding of how DLL files work, what they are used for, and how you can look out for any errors they might cause. Feel free to leave a comment if you have a question or something.


Hey! You should follow me on Twitter because reasons: https://twitter.com/FlippedCoding

Top comments (10)

Collapse
 
david_j_eddy profile image
David J Eddy

Might want to add a note about this being aimed at Windows / .NET. In my prev. career as a FOSS dev. I never came across DLLs, they generally do not exist in the *nix world.

Also, nice to see Windows devs also run into dependency hell...ugg.

Collapse
 
kayis profile image
K

Aren't they simply called *.so in Unix/Linux instead of *.dll?

Collapse
 
david_j_eddy profile image
David J Eddy

You are correct, in the *nix world they are *.so; though I imagine the internals are different the usage is the same. @Milecia McG maybe note this for the un-informed? (Like I was until about 5 minutes ago :D.)

Thread Thread
 
equiman profile image
Camilo Martinez • Edited

Now with .Net Core when build a ploject always generate .dll files even on *nix

Collapse
 
arasheedu profile image
Rasheed

And I thought only Windows devs run into dependency hell :-)

Collapse
 
stevetwitte profile image
Stephen Taylor Witte

I know what DLL's are, and I know they are mostly (only?) a Windows thing but what purpose do they serve in web development? I always thought they were for pretty low-level stuff, but I guess I'm wrong, please enlighten me.

Collapse
 
ajimerasrinivas profile image
Srinivas Ajimera

I was just examining through the web looking for certain information and ran over your blog. It shows how well you understand this subject. Bookmarked this page.

espirittech.com/delphi-development/

Collapse
 
jvarness profile image
Jake Varness

If you don't use .NET you'll never have to touch a DLL 😁

 
heyarviind profile image
Arvind

Like in GoLang? :P

Collapse
 
ajimerasrinivas profile image
Srinivas Ajimera

What a really awesome post this is. Truly, one of the best posts I've ever witnessed to see in my whole life. Wow, just keep it up.

espirittech.com/delphi-development/