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 methodology that enables a system to be modeled as a set of objects that can be controlled and manipulated in a modular manner
0
votes
Rules of thumb for local vs member variables
I've also heard that member variables should be used to describe something that is a characteristic of a class.
Have you tried to find this definition?
If that parser is logically stateless and …
4
votes
Accepted
Is it possible to avoid a lot of using statements?
C#3+:
internal class DataServiceAdapter : IDataService
{
public bool Method()
{
return Using(s => s.Method());
}
public int Method2(string arg)
{
return Using(s = …
3
votes
Should package names be singular or plural?
This probably depends on a specific language. In .NET (C#) it most definitely should be a plural if a namespace-type name collision is likely (the type name expected but namespace found error). I've d …
1
vote
1
answer
78
views
Virtual method returning a unique collection - how to ensure and hint?
I have a virtual method that returns a collection of items that must be unique. I want to make sure that it will be obvious when overriding the method. What is the best way to do this?
Here is an exa …
-2
votes
1
answer
242
views
Should I limit my type name suffix vocabulary when using OOP? [closed]
My co-workers tend to think that it is better to limit non-domain type suffixes to a small fixed set of OOP-pattern inspired words, e.g.:
*Service
*Repository
*Factory
*Manager
*Provider
I believe …
1
vote
"Immutable" interfaces
I believe what you want is a variant of Design by Contract (C# interfaces are a poor man's version of them). In C# it could be achieved via custom attributes and a static analyzer extension (e.g. for …
10
votes
4
answers
3k
views
Why not apply Interface Segregation Principle to "extreme"
Providing that clients would typically consume just one method, though methods would be conceptually related, why not always apply the Interface Segregation Principle to the extreme and have [many] si …
10
votes
2
answers
575
views
Should well-known business ID of an entity be represented with a dedicated type in DDD/OOP?
In practical terms it means using an custom (immutable) class over a string or some other primitive type.
Examples:
Publishing: International Standard Book Number.
Finance: International Securities …
7
votes
3
answers
1k
views
Should conditional logic be always coded via type system where possible?
I have a choice.
Option 1:
public class Sample
{
bool IsRelevant { get; set; }
}
Option 2:
public class Sample
{
}
public class RelevantSample : Sample
{
}
Is there a clear well-known rule …