Dependency is a broad software engineering term used to refer to when a piece of software relies on another one. A requirement & prerequisite that must be fulfilled or installed before your code or software can function.
Questions tagged [dependencies]
214 questions
99
votes
7 answers
Should I use Dependency Injection or static factories?
When designing a system I am often faced with the problem of having a bunch of modules (logging, database acces, etc) being used by the other modules. The question is, how do I go about providing these components to other components. Two answers…

RokL
- 2,421
- 3
- 19
- 14
54
votes
5 answers
How to deal with fear of taking dependencies
The team I'm in creates components that can be used by the company's partners to integrate with our platform.
As such, I agree we should take extreme care when introducing (third-party) dependencies. Currently we have no third-party dependencies and…

robinwit
- 650
- 1
- 5
- 10
45
votes
5 answers
What is the difference between a library and a dependency?
In this docker beginner video its explained, that different stacks may depend on different libraries and dependencies and that this can be handled with Docker.
However, I don't get what the difference should be between a library and a dependency. As…

Adam
- 577
- 1
- 4
- 9
43
votes
6 answers
When should dependencies be updated?
We had two major dependency-related crises with two different code bases (Android, and a Node.js web app). The Android repo needed to migrate from Flurry to Firebase, which required updating the Google Play Services library four major versions. A…

Chris Cirefice
- 2,984
- 4
- 17
- 37
39
votes
8 answers
Is it ok copying code from one application to another, both belonging to the same repository, to keep them independent?
Given a repository which contains two different applications A and B (e.g. bootloader and RTOS), is it ok to copy source code from A to B in order to avoid dependencies (include's, adding A source files to the B compilation) between them, so they…

Dan
- 615
- 5
- 7
37
votes
4 answers
Optional dependencies in npm?
I have a similar question to this, but not quite the same.
I would like for the user of my app to install it with whatever dependencies are needed for the way he would want to use it. So, for example, if they want to persist to MongoDB, then only…

imiric
- 481
- 1
- 4
- 6
26
votes
6 answers
Separating a "wad of stuff" utility project into individual components with "optional" dependencies
Over the years of using C#/.NET for a bunch of in-house projects, we've had one library grow organically into one huge wad of stuff. It's called "Util", and I'm sure many of you have seen one of these beasts in your careers.
Many parts of this…

Roman Starkov
- 4,469
- 3
- 31
- 38
24
votes
5 answers
How would one handle external dependencies in an open-source project?
When one writes an open-source project and uses Google Code or GitHub, and wants to use a library like Lua, how should one do this?
Should the dependency be included in the repository?
Should the dependency be built from within the same build…
user4595
21
votes
2 answers
Why should I use foreign keys in database?
In my 10+ years of experience in the IT field, I have never used foreign keys in any of my projects and I never felt the need. I did work with professional databases that had foreign keys constraints.
I am now at a position where we are building a…

TheTechGuy
- 1,035
- 1
- 8
- 16
18
votes
4 answers
Sharing classes or interfaces between different projects
I was looking for some answers in SO or here, but without any results, that's why I would ask you.
Let's assume I have a two different projects - for example server part and client part of an app. I'm developing my own part, while my friend is…

radekEm
- 367
- 1
- 3
- 10
14
votes
3 answers
Git Project Dependencies on GitHub
I've written a PHP framework and a CMS on top of the framework. The CMS is dependent on the framework, but the framework exists as a self-contained folder within the CMS files. I'd like to maintain them as separate projects on GitHub, but I don't…

VirtuosiMedia
- 4,089
- 4
- 33
- 43
14
votes
3 answers
Is it problematic to have a dependency between objects of the same layer in a layered software architecture?
Considering a medium-big software with an n-layer architecture and dependency injection, I am comfortable to say that an object belonging to a layer can depend on objects from lower layers but never on objects from higher layers.
But I'm not sure…

bracco23
- 399
- 1
- 8
12
votes
2 answers
Is it a good idea to manage a group of repo microservices as submodules of a master repo?
At the moment of writing I have let's say 4 micro services interoperating in order to build a bigger system.
Every microservice has its own repo.
What I'm thinking is that it would be useful to have parent repositories that group the children…

koalaok
- 493
- 5
- 17
12
votes
6 answers
In git, how to do versioning for a dozen libraries all worked at in parallel
We are doing projects, but we reuse a lot of code between the projects and have lots of libraries that contain our common code. As we implement new projects we find more ways to factor out common code and put it into libraries. The libraries depend…

sbi
- 9,992
- 6
- 37
- 56
11
votes
4 answers
What is the correct way of adding third-party code into a C or C++ project?
I want to incorporate some open source libraries into my C project. This is the first time I do that, so I don't know what is the right or most common way of doing it.
I see two possible paths I can take:
Download the code of each library I'll use,…
user300750