Guest Editorial
Inversion of Control Rocks
Inversion of Control (IoC) is about software components doing what they are told, when they are told. Your OO application could well become unmaintainable without it.
Reader Feedback : Page 1 of 1
#4 |
Eric Herman commented on the 9 Dec 2003
I''m glad that this subject is getting some more attention and we''re starting to think a bit more about it. My experiences have taught me to think of the use of static variables and static methods as a hint that I need to be thinking more about design. I''m not sure that the name "Inversion of Control" communicates the issue, but I don''t have a better name. I often use the phase "statics hurt" when talking about design. If possible, see if statics can be avoided entirely in your application. If not, how close can we get? Maybe we can hold a reference to a instance (which we can then mock out for testing) rather than use a static? Maybe a ThreadLocal can help? And who knows, maybe we''ll start to see some possibilities for polymorphism or plugabillity that were previously unavailable to us? |
#3 |
Rob commented on the 6 Dec 2003
IoC rocks indeed! (and also nice to know there''s actually a name for what i''ve been doing :-) |
#2 |
FYI: Since 1.0 M3, the Spring Framework''s bean factory supports both Type 2 IoC (bean property resolution) and Type 3 IoC (constructor resolution). |
#1 |
FYI: Since 1.0 M3, the Spring Framework''s bean factory supports both Type 2 IoC (bean property resolution) and Type 3 IoC (constructor resolution). |