/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

jurian.slui.mn
| | gpfault.net

[AI summary] The text provides a comprehensive implementation of a dependency injection system using C++11 and variadic templates. The system allows clients to define services and their dependencies, then automatically creates and injects the services in the correct order using topological sorting. Key components include the `injector` class for managing service instances, the `di_config` class for configuring dependencies, and the `generic_instance_factory` for simplifying service creation.
22.6 parsecs

Travel
| |
| | matthiasnoback.nl

Statically fetching dependencies I've worked with several code bases that were littered with calls to Zend_Registry::get(), sfContext::getInstance(), etc. to fetch a dependency when needed. I'm a little afraid to mention façades here, but they also belong in this list. The point of this article is not to bash a certain framework (they are all lovely), but to show how to get rid of these "centralized dependency managers" when you need to. The characteristics of these things are:
5.5 parsecs

Travel
| |
| | hisham.hm

Personal webpage of Hisham Muhammad, developer of htop, LuaRocks and GoboLinux.
17.5 parsecs

Travel
| |
| | matthiasnoback.nl

Part I: Don't use the standard controller The general belief is that controllers are the most tightly coupled classes in every application. Most of the time based on the request data, they fetch and/or store persistent data from/in some place, then turn the data into HTML, which serves as the response to the client who initially made the request. So controllers are "all over the place", they glue parts of the application together which normally lie very far from each other. This would make them highly coupled: they depend on many different things, like the Doctrine entity manager, the Twig templating engine, the base controller from the FrameworkBundle, etc.
35.7 parsecs

Travel
|