/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

georgemauer.net
| | blog.nuculabs.de

The Constructor Injection design pattern is a pattern that helps you declare all the required dependencies of a class in it's constructor. This is useful because it helps you decouple the code, you can specify an interface instead of a concrete type, remember, program to an interface. Also, in the constructor it is easier to guard against null objects. The calling code doesn't have to worry about null exceptions every time it uses a dependency.
4.3 parsecs

Travel
| |
| | ryanharter.com

I recently gave a presentation about how Dagger works under the hood, and I was once again struck by the elegance of the javax.inject.Provider interface. The interface is so simple it almost seems useless, but it's also incredibly flexible, and forms the basis of much of the code generated by Dagger. Like many dependency injection frameworks for JVM languages, Dagger uses and builds on the standard set of annotations for injectable classes defined in JSR-330 and provided in the javax.
2.5 parsecs

Travel
| |
| | brandonsavage.net

PHP more or less has two kinds of dependency injection available: constructor injection, and setter injection. Constructor injection is the process of injecting dependencies through the constructor arguments, like so: The dependencies are injected via the constructor, on object creation, and the object has them from the very beginning. Setter injection is different; instead of [...]
2.6 parsecs

Travel
| |
| | andreabergia.com

This post is part of the Languages Opinion series. Languages opinion - part one - JVM Languages opinion - part two - Rust ?thispost Languages opinion - part three - Javascript and Typescript Welcome back to my mini-series about programming languages. In this post, we will talk about one of the most interesting programming languages that I have seen in a long while: Rust.
25.3 parsecs

Travel
|