Imagine you have a user
object that holds the following data: id
, name
, email
, telephone
, address
, created date
, last update date
.
To create the user you only need a subset of these properties: name
, email
, telephone
and address
.
The number of properties can go out of hand and it is easier to group them in a dictionary or another object, but how would you name this?
new User(name, email, telephone, address) -> new User(____)
userProperties
. But I am here with the top most answer from the link of the former comment - tons of parameters is a design smell.