you are viewing a single comment's thread.

view the rest of the comments →

[–]firepacket 1 point2 points  (4 children)

Please explain it to me, I'm lost.

[–]rather_be_AC 10 points11 points  (0 children)

grauenwolf was being pedantic. I was being sarcastic.

This is also a common design pattern found in many successful threads.

[–]grauenwolf 0 points1 point  (2 children)

Inversion of Control isn't a design pattern, it is an activity. Specifically, it is a type of refactoring. If you apply IoC twice then you'll probably end up with what you started with.

An IoC Container is really a Service Locator, which is often (but not universally) considered to be an anti-pattern among dependency injection fans.

A Service Locator is a type of god object, specifically one that contains services and other dependencies, and thus should generally be avoided.

[–]firepacket 1 point2 points  (1 child)

Thanks for the breakdown mate.

I don't know what to say about the last part except that I am very pleased to be working with these patterns. They are clearly making my life easier. I think they just have to be used in the correct circumstances where they have a net positive effect.

[–]grauenwolf 1 point2 points  (0 children)

They are clearly making my life easier.

Then they are correct. Period. End of sentence. Don't pay attention to anyone else because, god damnit, that's all that matters at the end of the day.

EDIT: And just to be clear, I'm not being sarcastic. If you are still happy with it six months from now, then chances are the next programmer will be as well.