» Home » Dependency » Page 1
How to exclude a named package from a dependency that exists in another dependency using Maven Bundle Plugin (BND)?
Category : Programming Languages

I have two dependencies:


<dependency>
<groupId>org.postgis</groupId>
<artifactId>postgis-jdbc</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>com.springsource.org.postgresql.jdbc4</artifact

View Replies


How can I create a read-only Boolean dependency property that returns `And` operation between two other dependency properties
Category : 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!


View Replies


In PHP Dependency Injection, do I need to “require_once” the php file where the dependency is defined?
Category : 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?


Thanks,


View Replies


Dependency injection containers: how to handle objects that aren't a dependency of anything?
Category : 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

View Replies


Adding dependency to class only because another [child] dependency needs it - Design Smell?
Category : 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


View Replies


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

All,


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


View Replies


For which Maven dependency scopes is the dependency included in the compiled project?
Category : 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?


View Replies


Dependency Injection passing on dependency to other concrete types
Category : 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


View Replies


RequireJs - feeding values from one dependency as parameter for another dependency
Category : Web Design

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


define(['async!http://maps.googleapis.com/maps/api/js?libraries=places&key=APIKEY&sensor=true'],
function(){
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


View Replies


Dependency breaking techniques using dependency Inj for unit testing
Category : 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


View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .