Java applications have become steadily harder to understand and maintain in
recent years. Object-oriented programming has proven an effective way to
develop enterprise applications, but several recent trends are causing a
sharp increase in code complexity. One is the increasingly common use of the
Factory design pattern, abstracting away the object creation process (e.g.,
the creation of servlet objects by application servers, the use of Spring as
a general-purpose object factory, the use of JNDI, etc.) Another is the
increased use of the JavaBean pattern with reflection and annotations (e.g.,
for object serialization and persistence). The result is that objects have
more mutable state than ever, and the code causing changes to that state is
increasingly decentralized. Programs are becoming easier to write, but harder
to debug as complexity spirals out of control.
F... (more)