Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A design pattern is a general reusable solution to a commonly occurring problem in software design.
13
votes
Accepted
How to create a manager class without global variables nor singletons?
I suggest you look into using a dependency injection framework to achieve inversion of control.
Your "Manager" would not be a traditional Singleton, but you would only create one through the framewo …
5
votes
Accepted
Where should I parse data obtain with a DAO
Typically an unmarshalling construct can be used.
The job of the unmarshaller would be simply to translate from the string to your domain specific DTO. Your DAO or DTO will not need to change if the …
3
votes
Is dependency injection essential for unit testing?
No, DI is not essential for unit testing, but it helps a lot.
You can use factories or locators and test as you would with DI (just not as elegant and would require more setup).
Also, Mock Objects w …
2
votes
Accepted
Factory design pattern - getting the types from a table
This ties the db design to the programming language, which, in my opinion, is something you would want to avoid.
A simple alternative would be to add a key to the table and have a way to map that key …
1
vote
Best Method of function parameter validation
Based on the comment "one of my goals is to remove the parameter validation from the function itself so that you can only have the actual function code that accomplishes the intended task without the …