» Home » Dependency » Page 1
How can I create a read-only Boolean dependency property that returns `And` operation between two other dependency properties
by ThF in Programming Languages

How can I create a custom read-only Boolean dependency property that returns And operation between two custom Boolean dependency properties, for example (A, B),

And when A or B changes, I want the result property to trigger.

Any help to achieve that!

How to exclude a named package from a dependency that exists in another dependency using Maven Bundle Plugin (BND)?
by Rob M in Programming Languages

I have two dependencies:


In PHP Dependency Injection, do I need to “require_once” the php file where the dependency is defined?
by yodude7 in PHP

Taking Fabien Potencier's example:

class User
function __construct($storage)
$this->storage = $storage;
// ...

Assuming the Storage class is defined in a different php file (say, storage.php), do I need to include it in this file where the injection is done via a require_once?


Dependency injection containers: how to handle objects that aren't a dependency of anything?
by Chris Woods in Programming Languages

When we use a dependency injection container, ideally we pull only a single-top level object from it (e.g. an instance of Program) and let the rest of the application be composed automatically by the container.

However, sometimes there are objects which are not a dependency of anything else, yet we want to have them in the object graph. For example, I could have a

For which Maven dependency scopes is the dependency included in the compiled project?
by Shailja in Programming Languages

E.g. if I make the BukkitApi jar a dependency for a maven project with depenecy scope set to provided,compile,system, runtime or test

In which scopes will the bukkitAPI be included in the compiled output?

Adding dependency to class only because another [child] dependency needs it - Design Smell?
by LookBehindYou in Programming Languages

I am noticing occasions where I need to add dependencies to parent classes, and their parents and so on, only because a child class needs it. Is this a code smell? Is it reasonable for a parent class to need information only because a child class needs it?

In particular in our [slightly anemic] flavor of DDD this seems to occur with Application Services (Domain boundary) needing inf

Dependency injection - must the dependency be one of the class variables of the object into which it is injected?
by sdculver in Programming Languages


I am writing a little dynamic site in php, and am trying to use dependency injection rather than globals.

In my index, I create a $view object which contains the various elements to be displayed in the UI. In the index, I also have a switch($action){} structure that governs which controllers to require based on which item the

Dependency breaking techniques using dependency Inj for unit testing
by seph87 in Programming Languages

Currently reading "The Art of Unit Testing" by Roy Osherove. I'm about half way through it and so far it's an awesome book. I'm going to ask everyone to leave IOC containers out of this discussion. He only briefly mentions them (actually states IOC are out of the scope of the book which I don't understand and is one of the few places where I can criticize the book). Anyway, with IOC aside the v

RequireJs - feeding values from one dependency as parameter for another dependency
by sep in Web Design

We have wrapped the Google Maps API as an asynchronous module in RequireJs.

var maps = window.google.maps;
return maps;

Now we wish to extract out the API key into a config.js file to store configuration settings

Dependency Injection passing on dependency to other concrete types
by Dennis Caldwell in Web Design

I'm sure this is not a big deal and the application is not big but I'm trying to practice DI anywhere I can, for experience. I have the following class and all it does is parse some arguments entered by a user in a console application and return an instance of ICommand based on the arguments passed in. The design using commands in console apps is taken from Mark Seeman's book Dependency Injec

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .