The tag has no wiki summary.

learn more… | top users | synonyms

36
votes
6answers
8k views

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 ...
25
votes
6answers
738 views

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 ...
19
votes
5answers
2k views

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 ...
11
votes
3answers
3k views

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 ...
10
votes
3answers
1k views

Unit testing methods that call suppliers webservices

I have a class with one public method Send() and a few private methods. It calls a couple of webservices and processes the reponse. The processing is done in private methods. I want to unit test the ...
9
votes
2answers
1k views

.NET Dependency Management Systems

I have some .NET projects that are starting to get large enough to merit looking into Dependency Management solutions, so we don't have to copy binaries from one project to another. Here's what I've ...
9
votes
6answers
329 views

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 ...
8
votes
5answers
614 views

How to TDD test that objects are being added to a collection if the collection is private?

Assume that I planned to write a class that worked something like this: public class GameCharacter { private Collection<CharacterEffect> _collection; public void Add(CharacterEffect e) ...
8
votes
1answer
609 views

How do I distribute my scientific software with as few dependencies as possible?

As part of my research, I write a lot of Python and MATLAB code that never needs to be distributed to anyone else. Even if I need to distribute my software, Python and MATLAB, both being interpreted, ...
7
votes
3answers
170 views

Database Normalization vs dependencies

I am developing 3-4 interdependent programs. Call them foo bar baz and auth. I want them to be independent of each other. Imagine if I were to license out each program to other companies. Some ...
6
votes
3answers
398 views

Few big libraries or many small libraries?

Over the course of some months I've created a little framework for game development that I currently include in all of my projects. The framework depends on SFML, LUA, JSONcpp, and other libraries. ...
6
votes
1answer
210 views

How to organize the dependencies of a project [closed]

I have a project built with Gradle, which contains libraries which can be used freely outside the main project, like this: The folders with a square at the bottom right are project modules. I want ...
6
votes
3answers
323 views

How to model the dependencies between fields in very complex forms

We have to create a web application that will be used as an application form for multiple insurance products (15 in total). This application form will be similar to a form wizard, it will span across ...
6
votes
1answer
144 views

What to focus on when separating a monolithic codebase into separate (NuGet) packages?

I work on a fairly large web application. The main solution containing the web application project has over 100 projects. The average build time of that solution is 2 minutes on a 12 GB quad-core ...
5
votes
3answers
269 views

OOP Practice: how to best handle dependent dependencies

I have a problem with the design shown in the picture. My Section class has some TextBlocks (or simply Blocks). The section should be drawn on a page (a Bitmap as device context). It sets the blocks ...
5
votes
4answers
2k views

Subrepositories (submodules) as a dependency tracking solution - yes or no?

What do you think about SCM-based (subrepositories in mercurial, submodules in git) dependencies management? Is it definitely a good way of managing dependencies? Or definitely bad way? Should I ...
5
votes
3answers
294 views

Eliminating Dependencies vs Eliminating Redundancy

Upon my assignment to a project, I discovered that many message classes were received and then kept intact and passed around inside the receiving application. When these messages changed, code ...
5
votes
1answer
206 views

Versioning and deploying dependent systems

I need some best practices or experiences of developer teams who had to treat the same issues I have at the moment =) Our company is developing a client software for years. The one and only ...
5
votes
3answers
4k views

How to organise projects with dependencies on BitBucket?

Both Mercurial and BitBucket make one fundamental assumption: 1 repo = 1 project. If I have a project that has a dependency (a library) which is shared by many projects, this assumption gets in the ...
5
votes
1answer
77 views

Coping with build order requirements in automated builds

I have three Scala packages being built as separate sbt projects in separate repos with a dependency graph like this: M---->D ^ ^ | | +--+--+ ^ | S S is a service. ...
4
votes
5answers
1k views

Why do projects opt to stay on an older version of the .NET Framework? [closed]

Why do projects opt to stay on an older framework version of the .NET Framework? For example, staying on .NET Framework version 3.5 which was released in 2007 instead of upgrading to the latest 4.5.1 ...
4
votes
7answers
864 views

Why don't software libraries solve all our problems? [closed]

Modular programming and reusable software routines have been around since the early 1960's, if not earlier. They exist in every programming language. Conceptually, a software library is a list of ...
4
votes
1answer
119 views

Dependency Management in the real world?

Most of the examples i've see when watching anything on dependency management hit what i consider to be the holy grail in that the only dependencies on classes are interfaces that the IOC container ...
4
votes
1answer
98 views

Do I need to handle licenses of immediate dependenies?

Let's assume within my project which is GPLv3 based I'm using a single library called a-lib.jar. That jar itself is licensed using Apache v2 license, so I should be fine with the GPL as long as I ...
4
votes
2answers
360 views

Minimizing Dependencies For GUIs

I've been working on a project, and have been charged with designing the projects GUI front-end. I'm coding in Java and using the Swing toolkit. Usability-wise, the GUI front-end follows all of ...
4
votes
1answer
268 views

What is the name of this relationship between objects? [closed]

Different types of dependencies have particular names, such as linear dependency, circular dependency, self-referencing object, etc. What is the name of the dependency where those rules are true? A ...
4
votes
4answers
294 views

Continuous integration never results in build errors

I'm working with a variety of Java EE websites which use internal libraries we've developed. For each website, we only upgrade to new versions of our internal libraries as needed, and before ...
4
votes
2answers
411 views

Using absolute paths for build dependencies

Currently we are using Source Safe and have started migration to Subversion. All of our external SDK's(> 500 MB) are held in Source Safe right now, and I am looking for ways to move them from VSS to a ...
3
votes
2answers
295 views

Managing DLL files, deployment, and ease of use for the end user

I've been thinking recently about being an end-user who wishes to download one of my own projects and use it on a perfectly average machine. Having an equal background in Unix as well as Windows, I ...
3
votes
1answer
86 views

SVN shared modules / dependency management

I'm working with a small-ish team of developers. We're using Subversion for version control. Much of the software is for embedded systems. We want to set up a reasonably convenient way to share ...
3
votes
1answer
302 views

How to handle passing multiple dependencies in a module hierarchy

So I have my application consisting of a number of modules in a module hierarchy. Furthermore let's also assume each module is a class and we have a tree of classes where the classes at the top are ...
3
votes
1answer
77 views

UI requires data of certain types. Can it go in a SPROC?

I'm actually arguing against this, but want to see if I'm out of line. We have a PaymentQueue table and a simple UI. This table is, at the moment, primarily used by the UI and no other business ...
3
votes
1answer
119 views

Is the target of 3 dependencies per class always achievable?

I'm reading the Clean Code book and a chapter says that if a class has more than 3 dependencies is a code smell of that class isn't doing one thing. Or what is the same, it isn't following SRP. I'm ...
2
votes
3answers
237 views

How to avoid binary dependency on size change

class A { public: int i; }; // A.h and defined in project libA.vcxproj (libA.dll) I'm using class A in multiple places at various projects as below. Apporoximately 100 projects. include "A.h" class ...
2
votes
3answers
176 views

Java logging dependency for a low-level library

I inherited a lower-level open source Java network library. The library is intended to be used by higher-level application protocol libraries which are in turn used by application code. My library, ...
2
votes
1answer
214 views

Unit Testing Open Source projects that require keys for api calls

What's the recommended method for setting up tests on code that requires a private key to make calls to external web services? Full on mock objects or is there a way of distributing open source unit ...
2
votes
4answers
4k views

How to solve cyclic dependencies in a visitor pattern

When programming at work we now and then face a problem with visitors and module/project dependencies. Say you have a class A in a module X. And there are subclasses B and C in module Y. That means ...
2
votes
3answers
254 views

Support multiple frameworks in a JavaScript library

I have a small JavaScript library that I've written that depends on prototype.js. I'm considering creating a new version that would use jQuery instead. The goal is to make it easier for users to ...
2
votes
1answer
168 views

Is there a valid case for two components to depend on each other?

Dependencies are services required by an object to perform its responsibilities. In OOP context it can be thought as a parameter in a constructor. In my experience I've never found a case for a valid ...
2
votes
2answers
725 views

Is switch-case over enumeration bad practice?

I have an enumeration with the commands Play, Stop and Pause for a media player. In two classes I do a switch-case over the received commands. The player runs in a different thread and I deliver the ...
2
votes
1answer
58 views

Are the required parameters of a function called dependencies?

I'm studying dependency injection and I want to know if required function parameters can be considered dependencies. I'd just like to make sure before I go around referring to them dependencies and ...
2
votes
3answers
384 views

Using two versions of a class in the same code

At my job, in our core project, we have a Validation class that has been evolving with the years. And ee have an old project with an User class that uses an old version of the Valdiation class. And ...
2
votes
1answer
159 views

How to deal with dependency when you have separate projects?

I know there is all this talk about having only one composition root that set all your dependencies and that you should always prefer constructor injection to other types, but sometimes it just ...
2
votes
1answer
146 views

How to output library test/benchmark data in a web framework?

I am writing an MVC framework. I have a folder full of library classes, each are self contained, and could be ripped out of the framework and used by themselves. The only problem is that a few of ...
2
votes
0answers
180 views

How to avoid module dependency chain nightmare caused by transitive dependencies?

Many (most?) AngularJS folks seem to advocate for breaking AngularJS apps up into many modules. Brian Ford in his blog already states that packaging by layer (controller, service, etc.) is a "silly" ...
2
votes
1answer
352 views

How do we isolate dependencies for a .Net app deploy in a way which is safe for a strongly-named assemblies?

To design in such that it is easy to deploy dependencies with your app, and so that development environments are easy to set up, it is advantageous to isolate an app's dependencies from it's ...
2
votes
2answers
210 views

Are there standard strategies for defining job flow and dependencies?

I'm working on a project that involves the chaining of separate jobs into a single master job, though there may be parallel paths in the chain leading up to the final output. Job and chain details ...
1
vote
4answers
2k views

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. ...
1
vote
2answers
138 views

JavaScript: Bundle a required, but common, polyfill in my library?

First, here are a couple of related, but not-quite-the-same questions: Should I include dependencies for which I have the source as projects in my solution? Depending on another open source library: ...
1
vote
2answers
2k views

Managing Maven dependencies between multiple components with multiple teams making changes

In a situation where there are multiple teams making changes to some Maven projects with dependencies between them (otherwise unrelated projects i.e. no super POM or anything like that), with each ...