News for hackers. Stuff that matters.
Re:Breaking Up with IoC Containers by nkohari on Monday July 19, 2010 @11:35AM (#1528996)
He's actually managed to create a container by using the variable scope of the App class. That'll work fine for awhile, but it doesn't scale particularly well. You also lose lifecycle management (in his example, everything is a singleton) and lazy instantiation. Also, you lose the ability to isolate dependencies on external libraries to separate assemblies -- in this case, the main assembly needs to know everything about everything.

I'm biased (I wrote a DI framework for .NET), but I don't really understand what people think they're gaining by avoiding the use of a container. The complexity of dependency wiring increases geometrically with the size of your application, and I personally would like as much of that complexity hidden as possible.

Re:Breaking Up with IoC Containers by DanielRibeiro on Monday July 19, 2010 @12:06PM (#1529089)
It is a good way to start. It is a bad way to end up. Dynamic languages can get away with not using IoC containers for large projects: http://onestepback.org/articles/depinj/index.html

On static languages, using a dynamic language DSL to configure the container will usually do wonders, while losing refactoring support (for instance, Spring plugin for Eclipse will be aware of all rename methods and rename classes, as long as you use the xml for configuration).