Object Orgy - Consequences

Consequences

The consequences of an object orgy are essentially a loss of the benefits of encapsulation:

  • Unrestricted access makes it hard for the reader to reason about the behaviour of an object. This is because direct access to its internal state means any other part of the system can manipulate it, increasing the amount of code to be examined, and opening the door to future abuse.
  • As a consequence of the difficulty of reasoning, design by contract is effectively impossible.
  • If much code takes advantage of the lack of encapsulation, the result is a scarcely maintainable maze of interactions, commonly known as a rat's nest or spaghetti code.
  • The original design is obscured by the excessively broad interfaces to objects.
  • The broad interfaces make it harder to re-implement a class without disturbing the rest of the system. This is especially hard when the clients of the class are developed by a different team or organisation.

Read more about this topic:  Object Orgy

Famous quotes containing the word consequences:

    Without being forgiven, released from the consequences of what we have done, our capacity to act would ... be confined to one single deed from which we could never recover; we would remain the victims of its consequences forever, not unlike the sorcerer’s apprentice who lacked the magic formula to break the spell.
    Hannah Arendt (1906–1975)

    [As teenager], the trauma of near-misses and almost- consequences usually brings us to our senses. We finally come down someplace between our parents’ safety advice, which underestimates our ability, and our own unreasonable disregard for safety, which is our childlike wish for invulnerability. Our definition of acceptable risk becomes a product of our own experience.
    Roger Gould (20th century)

    The medium is the message. This is merely to say that the personal and social consequences of any medium—that is, of any extension of ourselves—result from the new scale that is introduced into our affairs by each extension of ourselves, or by any new technology.
    Marshall McLuhan (1911–1980)