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*
-
1What bad practices do they encourage? As for private classes, you shouldn't need to have very many of them if you have good encapsulation; for one thing, they're much harder to test.Aaronaught– Aaronaught2012-09-01 23:09:24 +00:00Commented Sep 1, 2012 at 23:09
-
Err, 1 and 2 are the bad practices. Large constructors and not using encapsulation to establish a minimal interface? Also, I said private and internal (use internals visible to, to test). I have never used a framework that forces me to use a particular IoC container.Dave Hillier– Dave Hillier2012-09-01 23:16:15 +00:00Commented Sep 1, 2012 at 23:16
-
2Is it possible that perhaps a sign of needing many parameters for your class constructors is itself the code smell and the DIP is just making this more obvious?dreza– dreza2012-09-01 23:23:32 +00:00Commented Sep 1, 2012 at 23:23
-
3Using a specific IoC container in a framework generally isn't good practice. Using dependency injection is a good practice. Are you aware of the difference?Aaronaught– Aaronaught2012-09-02 00:12:46 +00:00Commented Sep 2, 2012 at 0:12
-
1@Aaronaught (back from the dead). Using, "dependency injection is a good practice" is false. Dependency Injection is a tool that should be used only when appropriate. Using Dependency Injection all the time is a bad practice.Dave Hillier– Dave Hillier2013-10-15 12:31:27 +00:00Commented Oct 15, 2013 at 12:31
|
Show 11 more comments
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