All Questions
5 questions
4
votes
7
answers
2k
views
When to use a class with a constructor vs using a method returning an object
I've been working in a rather large codebase filled to the brim with small classes such as
class Person
{
public string name;
public int age;
public int height;
}
As a mainly front-end ...
1
vote
2
answers
385
views
Are experienced developers and software architects able to describe an entire software application in terms of design patterns?
Do experienced developers and software architects see entire application in terms of design patterns?
In other words experienced developers and software architects able to describe an entire software ...
17
votes
3
answers
5k
views
Does the state Pattern violate Liskov Substitution Principle?
This image is taken from Applying Domain-Driven Design and Patterns: With Examples in C# and .NET
This is the class diagram for the State Pattern where a SalesOrder can have different states during ...
5
votes
4
answers
334
views
How to represent partially valid object
Suppose a function deserializes and validates some object from string and returns the result as Either<string, MyObject>. So an object is either completely deserialized and valid or some kind of ...
0
votes
3
answers
1k
views
When should method overloads be refactored?
When should code that looks like:
DoThing(string foo, string bar);
DoThing(string foo, string bar, int baz, bool qux);
...
DoThing(string foo, string bar, int baz, bool qux, string more, string ...