You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
Thanks Ben. I've honestly only worked with IOC Containers for about a year, and though I don't do it, tutorials and peers around me really focus on property injection (including private). It's crazy, and it brings up all the points I make. But even if others are in this situation, I think the best thing they can do is learn more about how IOC Containers should work to follow principles, and point out these principle-breakers in code reviews. However... (continued)Suamere– Suamere2014-09-20 13:28:40 +00:00Commented Sep 20, 2014 at 13:28
-
My biggest concern isn't necessarily listed in OOP/SOLID Principles, and that is explicitness of scope. I still we are throwing Block, Local, Module, and Global level scope understanding out the window for a keyword. The whole idea of using blocks, and declarations determining when something falls out of scope or is disposed is huge for me, and I think that was the scariest part of IOC Containers for me, to replace that very basic piece of development with an extension keyword.Suamere– Suamere2014-09-20 13:32:10 +00:00Commented Sep 20, 2014 at 13:32
-
So I marked your response as the answer because it really does address the heart of this. And the way I read it is that you just have to trust what IOC Containers do under the covers because everybody else does. And as far as the openings to possible misuse and the elegant way it covers it up, that's for a shop and code reviews to worry about and they should do their due diligence to follow good development principles.Suamere– Suamere2014-09-20 13:34:07 +00:00Commented Sep 20, 2014 at 13:34
-
2In regards to 4, Dependency Injection is not in the SOLID acronym. 'D' = 'Dependency Inversion Principle', which is a totally unrelated concept.astreltsov– astreltsov2015-05-08 15:29:16 +00:00Commented May 8, 2015 at 15:29
-
@astr Good point. I've replaced "injection" with "inversion" as I think that's what I meant to write in the first place. That's still a bit of an over-simplification as dependency inversion doesn't necessarily imply multiple concrete implementations, but I think the meaning is clear enough. It would be dangerous to depend on a polymorphic abstraction if switching out implementations was an OCP violation.Ben Aaronson– Ben Aaronson2015-05-08 15:53:03 +00:00Commented May 8, 2015 at 15:53
Add a comment
|
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you