Professional Documents
Culture Documents
* Abstract unit of measurement that does not depend concrete things. Then, other
concrete units of measurement are provided and conversors factor to convert from
one another is used depending on the purpose.
In Java 2D API this unit is the points in user space. The concrete unit is the
points in device space (mesured in pixels). The points in user space are
converted into inchs first. The factor is arbitrary (or set by some decission
but is selected by the programmers). 72 points in user space is an inch. Then
an inch in EACH DEVICE is converted into pixels.
* The manipulation of the objects are done in phases. In each phase, grouped
things are done and objects with some characteristics are manipulated. For
example, in Java 2D API, in the before transformation phase, the objects to
be manipulated are shapes in user space coordinates. After that, the objects
are those shapes in device space coordinates (pixels).
* The abstraction is a logic understanding. So, the concepts can be presented
in one way and the implementation can layout concepts into physical objects as
it wishes. For example, a Graphics pipeline can be thought as several separated
steps but the implementation can mesh up several of them into one for
efficiency.
Different coordinates systems that are indepent and are linked by convertion
factors or transformations.
* The objects holds an internal state so different objects can colaborate in the
modification of this internal state. When something is done, the internal state
is selected to the job in a predictable way.
* Limit the classes which you interact with and do convertions to that classes.
For example, a rendering engine works with Shapes. A Shape can be filled.
A shape can be drawn its outline. To do so, with the stroke of the pipeline,
transforma the outline of the Shape into another Shape and the fill. To draw
text, transform characters into Shapes with the help of a font and the fill.
* The participant objects are not tightly coupled one another. Instead of that
they are registered and associated with a symbol into a directory. When some
operation is needed to be done, a controller gathers information about the
environment and from that, recovers the associated object. Then, the object
will implement some callbacks and the environment is passed to the job. Another
option is that the object retrieves more objects to the job.
For example
* Name things. Put the things a name and give a definition for them.
* There are object that have no state and provide only function to do things.
Because of that, other objects hold their state and a reference to them.
* There are types of interfaces or concepts that are the glue between
components and are the convention to work. Each component can work as it wants
but when communication is needed, those concepts that all know about them
are used. So, component particular data must be converted to the abstract
concept.
* User objects to generate values, store them and then use other objects to
interpret those values.
* For abstractions specify descriptions but not how they are implemented.
The abstraction must be in terms of concepts. And then, the implementation
picks up mechanisms and defines what that mechanisms mean and the rules
defined over them.