Skip to main content

All Questions

3 votes
3 answers
471 views

How to efficiently build objects without default constructors

I am trying to explain and understand a way to create object which cannot have "default" instances. Typically I want classes which represent, as closely as possible, the real-life concept I ...
Patrick Wright's user avatar
6 votes
1 answer
1k views

Approach for Constructing View Models in Complex MVVM Application

I'm struggling with the design in a WPF MVVM application. In a few courses I've taken, they say that having a lot of parameters in a constructor is a code smell, but they never address how to deal ...
Adam's user avatar
  • 169
27 votes
3 answers
30k views

Constructor with tons of parameters vs builder pattern

It is well know that if your class have a constructor with many parameters, say more than 4, then it is most probably a code smell. You need to reconsider if the class satisfies SRP. But what if we ...
Narek's user avatar
  • 1,143