One is to create a object with a rich constructor so that its at least created with all
least created with all its mandatory data.
The other is to create o object an empty object and then populate it with the mandatory
data.
The former could have a well-formed object from the start.This aslo meants that, if you
have an immutable field, you can enforce it by not providing any method to change its
value.
The problem with a rich constructor is that you have to be aware of cyclic references.
Avoiding this requires special case code, often usingg lazy load.
You can do this creating an empty object.Use a non-arg constructor to create a blank object
and insert that empty object immediately into other object.The way,if you have a cycle,
other object will return an object to stop the recursive loading that two objects reference
each other.
Using an empty object like this means you may need some setters for values that are truely
immutalbe when the object is loaded.A combination of a naming convention and perhaps some
status-checking guards can fix this.You can alse use reflection for loading data.
(Spring supports Setter Injection very nice.Sometimes using rich constructor to create a object
is preferable after you evaluating.)