Hot answers tagged

13 votes
Accepted

Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods)

You already spotted most of the pros and cons. Using cs files as references is indeed more lightweight and often easier to manage. However, I recommend to use this approach exclusively when your cs ...
Doc Brown's user avatar
  • 201k
12 votes

Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods)

DLLs are handy when an application is large and there are pieces that require updates, but not the entire application. So, if you're writing MS Word, it's handy to have the spell-check code in a DLL ...
dcguest's user avatar
  • 121
12 votes

Would we need Docker if applications were better behaved?

A major benefit of virtual machines and containers is the way you can isolate an application from any other applications, and reason about it as being a separate entity with clear interfaces that you ...
Arseni Mourzenko's user avatar
9 votes

Why use dynamic linking for less-popular libraries?

Because the license demands it for your use case (e. g. lib being LGPL vs. your project being proprietary). Because you want to decouple deployed app and lib version. Because you aren't absolutely ...
Murphy's user avatar
  • 821
6 votes
Accepted

How to hide the dependencies of a dll from the code calling it?

For getting this level of isolation, you probably don't need a separate process. A separate "AppDomain" will probably be enough. For this, let either the calling code not link against your lib, or ...
Doc Brown's user avatar
  • 201k
6 votes

Sharing database interface functionality among multiple applications

By directly coupling the clients to the database, updates will always be a problem. With a layer in between, you can call it a microservice or an SOA layer or whatever, you can keep the two separate....
Encaitar's user avatar
  • 3,063
6 votes
Accepted

Should a solution containing projects exposed as nuget reference them as package?

If I got this right, as soon as you replace the nuget reference from B to A by a project reference, there is no project left which consumes A as a nuget package, right? So if there is no consumer any ...
Doc Brown's user avatar
  • 201k
5 votes
Accepted

Choosing between Web API and DLL reference

There are a few considerations to make: Updates: changes to the BL will always be reflected in the API but you would need to install a new version of the DLL - Point for API Connection: A DLL will ...
Steve Barnes's user avatar
  • 5,280
4 votes
Accepted

Can I really make python work with VBA

If it is more important to you to use Python as a language, and not because you need the full stack of available modules for CPython, maybe a combination of Excel-DNA and IronPython maybe an option ...
Doc Brown's user avatar
  • 201k
3 votes
Accepted

Is it a good idea to make common Electron libraries available globally on Windows?

No. From the Electron tutorial: At this point, you'll need to install electron itself. The recommended way of doing so is to install it as a development dependency in your app, which allows you ...
Doc Brown's user avatar
  • 201k
3 votes
Accepted

What are the dangers/downside of unit tested dynamic library(DLL) being different from released library?

It is great to unit test things, even those that are are not externally accessible. You still need to test what you're shipping — because of compiler bugs, and configuration problems, etc... ...
Erik Eidt's user avatar
  • 33.4k
3 votes
Accepted

How can I make dll that can be called from several programing languages?

The difficulty you will face in using your C++ DLL is that: the symbols names will be mangled and are hence not easily usable from another language. the C++ object model will impose constraints on ...
Christophe's user avatar
  • 74.8k
3 votes
Accepted

Multiple DLLs vs Multiple EXE's in a project that needs to be modular (web browsing automation)

As you are mentioning .exe as the executable suffix, I assume you are working on Windows. Here, it is (at least in principle) possible to dynamically load and unload dynamic libraries, either via ...
dasmy's user avatar
  • 473
3 votes
Accepted

Sharing database interface functionality among multiple applications

There are a number of ways to solve this problem. Here I'll try to give a few of these: Have a centralized version of the DLL (say on your company's intranet) and have all apps check on startup (or ...
Miguel van de Laar's user avatar
3 votes

LGPL, .lib, .dll, and linking

The libconfig project builds a dll, but I also need to link my project against the .lib of libconfig to get the dll's definitions (Can someone explain why this is necessary, when I'm already including ...
SalgoMato's user avatar
  • 139
3 votes

Would we need Docker if applications were better behaved?

An Operating System lets many programs run together at the same time. It can place each program in a separate directory, no problem there. So why is Docker neccessary? Is it possible that the main ...
user355880's user avatar
3 votes

Would we need Docker if applications were better behaved?

You are correct. In a perfect world, everything that Docker does (whatever that may be) would be done by the operating system. Containers are just another form of process isolation, which is a core ...
user253751's user avatar
  • 4,863
2 votes

Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods)

You have pretty much summed it up in your question, I only have a couple of points to add. Mono Options is a great example of a NuGet package that uses the first approach very well. Alternatively, ...
Justin's user avatar
  • 1,728
2 votes

Advantages of using .dll files over linking .cs files to projects (for my own generic helper classes / extension methods)

Whether a dll is more beneficial or not depends on several factors: The size of the code (when compiled). How many exes use it. How often you intend to update the code. Whether or not the exes are ...
Pharap's user avatar
  • 549
2 votes

Why use dynamic linking for less-popular libraries?

(I am having a Linux oriented point of view; I don't know Windows, but its DLL could be slightly different than Linux ELF shared object dynamic libraries) A shared library is useful as soon as you ...
Basile Starynkevitch's user avatar
2 votes

Would we need Docker if applications were better behaved?

Let's take this from the top, shall we? A well-written program will be configurable. It will have a configuration file or database which specifies where to look for files, which network ports to open ...
Thomas Girard's user avatar
2 votes

Would we need Docker if applications were better behaved?

Your question is based on an expectation that we can unify operating systems in a way that application files are universally compatible. In other words: That's the long and short of it, really. If it ...
Flater's user avatar
  • 45.7k
1 vote
Accepted

Securing cross DLL references within an Application

Appears that the .NET security stategy (strong names and assembly signature schemes) is to protect the User from malicious software (when the user runs a signed assembly, they can be sure it was ...
Ama's user avatar
  • 247
1 vote

Implementing new project to communicate with old ones. The correct way

Requirements The most important thing will be the speed of each operation as it might be used to control emergency stops and such. The diagrams you've shown do not inherently translate to ...
Flater's user avatar
  • 45.7k
1 vote
Accepted

Organizing code to minimize repetition and external references

Create a new nuget package for S1 with a dependency on the Unity package. You can then consume this nuget package i your applications and they will automatically import Unity as a dependency
Ewan's user avatar
  • 71k
1 vote

Extracting data from third party program i.e. craft an unofficial API

If the entire application is contained on a specific server, it is most likely writing that data somewhere, you may be able to find the datafile and then see if you can make sense of that. If the ...
unflores's user avatar
  • 402
1 vote

Can I really make python work with VBA

You can keep it loose with Python scripts and call them with what I call a gateway class. So called gateway because it opens the rich world of the Python ecosystem to the Excel VBA Developer http://...
S Meaden's user avatar
  • 179
1 vote

Sharing database interface functionality among multiple applications

It should be the sign that a move to a n-Tier / SOA approach may be beneficial to this project. Perhaps some part of the database access may benefit not to be done directly, from a DLL, but from a ...
Arnaud Bouchez's user avatar
1 vote
Accepted

Explicitly mark unexported functions in a DLL?

While I don't think that this sort of pre-processor-level “comment” is evil, I'm also not very excited about it. Your tools won't interpret it in any way and won't be able to catch any bugs caused by ...
5gon12eder's user avatar
  • 6,976

Only top scored, non community-wiki answers of a minimum length are eligible