Object Orgy - Causes

Causes

Members may be declared public to avoid the effort or syntactic overhead of providing proper accessors for them. This may well increase readability of the class itself, but at the expense of the consequences described above.

In particular, a member intended to be readable by other objects may be made modifiable as well, because the language used does not provide a convenient construct for read-only access.

An object orgy may be a symptom of coding to an immature design, when the designer has not sufficiently analysed the interactions between objects. It can also arise from laziness or haste in implementing the design, especially if the programmer does not communicate enough with the designer. Reluctance to revise the design when problems arise also encourages this (and many other) anti-patterns.

Read more about this topic:  Object Orgy