Software design talk: Do you mean methods or operations?
Clearness and vagueness, precision and ambiguity are important concepts in software design in general; these are especially valuable when talking about computations at different levels of abstraction.
The trick is to choose the concepts that match the intention of the talk; for instance, when talking about service contracts in the context of the service level design (aka service-orientation), what do you say? "the operations of the service" or "the service’s methods" ?
Smalltalk programming language has the terms messages, operations and methods to refer to different computational behaviors. A message is the mechanism a client makes use of to communicate with any given object; an operation is a member of the explicit list of behaviors on the object’s interface; a method is the set of executable statements that comprise the implementation of the related operation.
In the similar style, the C# programming language standard makes the same distinction:
Mechanism | C# | Smalltalk | At the “Service level” |
How to communicate with an object or service | method invocation | message | message |
Behavior explicitly expressed as part of the object’s interface or service's contract | method | operation | operation |
Actual implementation of operation | method body | method | depends on your programming language or environment |
Why this is important?
Because "If you call a tail a leg, how many legs has a dog? Five? No, calling a tail a leg don't make it a leg" -Abraham Lincoln
What I mean is that is important to be explicit, especially in the context of the lessons learned about distributed object design and service level design, if you make use the same term for two different concepts then don’t blame other people saying "they don’t get it"
Comments
- Anonymous
May 14, 2005
RePost:
http://www.yeyan.cn/SoftwareEngineering/SoftwareDesignMethodsOperations.aspx