Front | Back |
Structured Coding
|
Every structure should have only ONE exit and entry point
|
Objects VS ADTs
|
ADT meant to structure data in a useful fashion, acted upon by outside forces. Object takes requests from clients but operations changing the state are internal, are encapsulated and make strong use of data hiding.
|
Dynamic Class Binding
|
Actual class of any value put into a variable is not fixed at compile time.
|
Dynamic Method Message Mapping
|
Once DCB is allowed, this must also be allowed. In Java/C++ the search for a method is not literal, compiler stores pointers. In Ruby, the search IS literal.
|
Polymorphism
|
DCB + DMMM
|
Object Oriented Programming
|
ADT + Inheritance + Polymorphism. Advantages are matches problem domain, code reuse, understandability/maintenace, ease of design.
|
Meta-object Protocol
|
How classes and objects are implemented and manipulated depending on language. Fixed in many languages. In Java, object is top of hierarchy, in C++ OO mechanics are open for customization.
|
Reverse Polymorphism
|
Downcasting. Make sure to use instance of checks or similar.
|
Specialization
|
Subtyping, new class is specialized form of parent, substitutable.
|
Specification
|
Focus is on filling holes left incomplete by parent.
|
Construction
|
Child inherits most/all functionality and changes only small things. Not a subtype, should use containment instead.
|
Generalization
|
Subclass extends behavior of parent to make a more general object. Invert hierarchy instead.
|
Extension
|
Focus on adding new abilities. Obeys substitution.
|
Limitation
|
Behavior of subclass smaller then parent.
|
Variance
|
More then 2 classes have simmilar implementations, but not hierarchial. Better to factor out common code.
|