The tag has no wiki summary.

learn more… | top users | synonyms

30
votes
6answers
5k 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
698 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 ...
16
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 ...
10
votes
3answers
2k 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 ...
9
votes
3answers
842 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 ...
8
votes
5answers
528 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
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 ...
7
votes
1answer
423 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, ...
6
votes
3answers
321 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
164 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 ...
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
248 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
3answers
3k 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
60 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. ...
5
votes
1answer
106 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 ...
4
votes
5answers
928 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
1answer
155 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 ...
4
votes
2answers
341 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
264 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
2answers
342 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 ...
4
votes
4answers
275 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 ...
3
votes
7answers
778 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 ...
3
votes
2answers
196 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
75 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 ...
2
votes
3answers
197 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
1answer
171 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
3answers
193 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
147 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
537 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
52 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
320 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
2answers
500 views

For nodejs what are best design practices for native modules which share dependencies?

Hypothetical situation, I have 3 node modules all native, A, B, and C.  A is a utilities module which exposes several functions to javascript through the node interface, in addition it ...
2
votes
1answer
145 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
2answers
192 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
2answers
79 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
123 views

Is it okay to user other open source libraries when building your own or should that be avoided?

Seems like an odd question, but I've been questioning this myself for some time now. I've been told that, if you're working on a open source library/project, you should avoid adding dependencies for ...
1
vote
7answers
132 views

How can I use different versions of an evolving library in different projects?

The problem I write a lot of exploratory code in my research. As I go along, I put functionality that I'd like to reuse in a central location. A project might look like this: ./mylib ./exploration ...
1
vote
2answers
600 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 ...
1
vote
1answer
99 views

In event sourcing, is it ok to introduce a dependency in my message class?

Following Martin Fowler's explanation on event sourcing, I have a message class that looks something like this: ShippingEvent { Process(Ship ship) {} } However, in my case, I need to talk to ...
1
vote
1answer
85 views

Type dependencies vs directory structure

Something I've been wondering about recently is how to organize types in directories/namespaces w.r.t. their dependencies. One method I've seen, which I believe is the recommendation for both Haskell ...
1
vote
1answer
44 views

Do any package managers provide select-one dependencies

With jquery very slowly being phased out you get into more and more situations where library X will run with either jquery or zepto.js (but at least one is required). No package managers that I can ...
1
vote
2answers
303 views

Interface Segregation Principle - type hinting multiple interfaces

The question is about typehinting of the role interfaces. The code example has two DataMappers which typehint the interface they need in the constructor, FooDataMapper type hints the Preparable ...
1
vote
4answers
2k 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 ...
1
vote
1answer
259 views

Is there a design pattern for managing dependencies?

I'm building a component that manages available resources (JavaScript and CSS files) for a web page. As controls are added to the page, they register and un-register their requirements with this ...
1
vote
1answer
30 views

Correct process for creating builds reliant on 3rd party packages

I work on a Symfony 2 codebase. We use a number of third-party packages (most are in the Symfony Standard Edition). We use composer for dependencies. We current have all of our third-party code ...
1
vote
1answer
110 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 ...
1
vote
0answers
66 views

Where to set the model in this design (service-provider pattern)?

we are modelling an application using the "Service-Provider" pattern, where the service will offer a generic functionality implemented by different providers registered on the service. The ...
1
vote
2answers
388 views

NodeJS: Freeze dependences before testing and deployment? Check in node_modules?

Suppose you have a NodeJS application. A release could consists of multiple steps: Automated and/or manual tests Deployment (if something goes wrong) Rollback to the last stable version There are ...
1
vote
0answers
74 views

Is there a formal enumeration of the ways that components can be coupled / depend on eachother?

Say you have class A { } class B { } One type dependency is "method parameter": class A { } class B { public void M(A a) { } } Another is "method returns": class A { } class B { ...
1
vote
0answers
26 views

Custom maven mojo and tools

I'm writing maven plugin which depends on several java tools. I'm quite happy with it and want to share it with the community. I'm interested in correct way to handle dependency to these tools: Use ...