The object model provides theoretical foundations upon which object-oriented design is built.
The OM is based[1] on the principles of abstraction, encapsulation,
modularity and hierarchy, introduced in this section and expanded in the rest of the paper.
Abstraction is well known to any natural scientist or anybody interested in modeling. It consists
of extracting the relevant common features of the system to be modeled, providing adequate generalization,
and removing irrelevant details. For example, all protons in the universe share many properties: value of
their masses, electric charges, spins,... (data) and the way they interact with themselves and other particles
(methods). Protons are still protons, regardless of their location (inside our mouth or in a distant galaxy)
or their internal state (i.e., value of their momentum, orientation of their spin,...).
Abstraction determines the characteristics of an object that distinguish it from other kinds of
objects (e.g. protons are different from neutrons or electrons, but two protons in different atoms are
still protons). This is the "outside view" of the object. That is how clients, particles that
interact with the proton, see it. It is important to have the right set of abstractions for a given problem
domain. For example, to different levels of abstraction, protons and neutrons can be either viewed as different
objects, or the same object (nucleon) in a different state. We will return to this later. There is a wide spectrum
of abstraction possibilities: objects could closely resemble "real" objects (car object, pendulum
object,...) but there could be quite "abstract" objects with apparently "no reason to exist"
(shape object, transaction object, photon, Cooper pair,...).
Encapsulation is also called information hiding. Clients (particles that interact with protons)
do not see a proton's internal structure ("inside view" of the object). That is, protons hide
information about their internal structure. In general, the interface of a class captures only the outside
view. For example, electrons of hydrogen atoms do not know the proton internal structure. They only see a
proton's interface: its mass, electric charge, linear momentum and spin. Encapsulation, then, is the process
of hiding all the internal details of an object.
Modularity means that a system can be decomposed into a set of weakly coupled modules. Hydrogen gas is
composed of many loosely interacting objects (hydrogen molecules). Each molecule is made of two weakly
interacting objects (hydrogen atoms). In turn, each hydrogen atom consists of two objects (proton and electron)
that collaborate (are bound together) exchanging messages (photons, the messengers, are the carriers of the
electromagnetic interaction). In general, one of the most difficult problems in the OO design of complex systems
is to "discover' the right modules to mimic the system. This difficulty is analogous to finding the
"right" ground state in a many-body problem (e.g., superconductivity) as discussed later.
Hierarchy is the ranking or ordering of abstractions. Consider a deuterium atom. It has just a single
electron, but the nucleus consists of a neutron and a proton. Electrons in the deuterium atom interact
(exchange messages = photons) with charged protons through the electromagnetic interaction. Neutrons are
uncharged particles so, at this level of abstraction, electrons see neutrons and protons as different particles
(objects). At a higher level of abstraction, now inside the deuterium nucleus, protons and neutrons
"collaborate" by sending "attractive" messages to each other (exchanging pions). They view
each other as different states of the same particle (in physicists language, they are members of a SU(2) doublet).
At still higher levels of abstraction, nucleons (protons or neutrons) are just possible states of more abstract
entities (SU(N) multiplets, with N = 3, 4,...) that encompass a large number of distinct particles at lower
levels of abstractions. Fig. 1 displays this example of subatomic hierarchical layering.
Figure 1. Subatomic hierarchical layering: in this picture we distinguish three levels of abstraction.
In atomic physics, layer 1, we describe the physics in terms of interacting electron and nucleus objects.
Inside the nucleus, layer 2, the appropriate objects are protons and neutrons. Finally, at higher collision
energy, layer 3, the proton is viewed as made of interacting quark objects.