Why do we model?
- A model is a simplification of reality. We model because we cannot
comprehend the complexity of a system in its entirety.
- We model to visualize, specify, construct, and document the
structure and behavior of a system's architecture.
- A model is a complete description of a system from a particular
perspective.
Principles of Modeling
- The choice of what models to create has a profound influence on
how a problem is attacked and how a solution is shaped.
- Every model maybe expressed at different levels of precision.
- The best models are connected to reality.
- No single model is sufficient. Every non-trivial system is best
approached through a small set of nearly independent models.
Basic Principles of Object Orientation
- Abstraction: the most important or essential aspects of something
while ignoring the less important details. Abstraction is dependent on
perspective - what is important in one context may not be in another.
We model our problem domain using abstractions.
- Encapsulation: physical localization of features into a single
blackbox abstraction that hides their implementation behind a public
interface. "Information hiding".
- Hierarchy: organization of abstractions according to some order
(e.g. complexity, responsibility, etc.).
- Polymorphism: substitute variables or objects or one type
with variables or objects of another type. Polymorphism gives us the
ability to switch components without loss of functionality.