Sunday, September 16, 2007

Objects have identity, components don't

A couple of rules:
  • Objects have identity, components don't.
  • Components have an emphasis on behavior, objects on state.
  • Object can expose methods to expose state and validate state.
  • Components with state are considered harmful - but sometimes inevitable
  • Events in components should always make it explicit if they are before or after the fact occurred. To make it explicit in which state the component is and not in some kind of transition
  • Services are components designed for remote access. (coarse granular)
To me, a service is instantiated and accessible at a certain physical location, however this does not match with the situation where a service is deployed in an embedded way. Mmmm.

No comments: