Wednesday, December 8, 2010

object oriented design



Encapsulation & Abstraction
Encapsulation is the implementation: we can't access the low-level details of a class
Abstraction is the implication: objects interface each other at a high level.

In layman's terms (i.e. in a way that can have implications beyond coding):
Complexity is hidden (i.e. locked away; not just out of sight, but you are denied access to it) and (selectively) revealed as high-level information (i.e. useful information, attributes, functionality)


Interhitance & Polymorphism
Inheritance and Overriding are the implementation: classes can be defined in an efficient manner that re-uses code, despite a broad range of differences between individual objects.
Classes are organized in an additive modular hierarchy (such that each successive level of the hierarchy inherits every attribute and action* that the previous level does) - but each particular class may override anything it inherits.
Polymorphism is the implication: We can generally rely on children or instantiations of a class to have similar features as their siblings, yet that is not a hard-and-fast rule such as would prevent useful variations.
* do children also inherit relationships? Is there any other category of features missing from this list?

In a more general way:
Objects are defined in terms of increasingly specific categories, and any individual can define how it deviates from its parent (or archetype). This allows objects to have broadly recognizable features based on their lineage (i.e., their identity) without losing the ability to have additional features - even ones that conflict with the standard features.

Monday, September 20, 2010

Thursday, September 9, 2010

context aware interactions

here's a design that's almost ready for prime time: cell phones should respond to one another to determine what level of ringing noise to make. If several phones determine - via geolocation - that they're in a room together, and a few of them have been set to silent mode, the rest could reasonably deduce that they should also be silent.