|
|
 |
Article:
 |
 |
What Is Service-Oriented Architecture
|
| Subject: |
CD analogy |
| Date: |
2004-11-09 13:45:40 |
| From: |
_nyirenda |
|
|
|
|
I dont agree with your object oriented example of a cd having to play itself. The way I have seen it done; and the way I have always done it is to seperate concerns. So I would pass my cd object to a cd player object and he does the business of playing the cd. SOA is an extension of this concept but done in a distributed and federated manner and across process boundaries.
Joseph Nyirenda
|
- CD analogy
2004-12-20 08:26:22 spamnomag
[Reply]
I must agree. In OO objects are responsible for their own state. That does not imply that for each instance of data you wish to process, you need a dedicated instance of an object to process it. If there is some extra data the player needs to play the CD (like track number, position of read head, etc) the player is responsible for maintaining that data and it should not be directly manipulated by external objects. The CD itself, which is the payload of a "play" message to the player, could be considered transient state for the player, and (typically) should not be manipulated by external objects while it is being played by the player. So in a sense OO says objects "encapsulate data" as apposed to the data being permanently bound to the object.
|
 |
Sponsored By:
|