View Single Post
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2006-01-26, 00:26

From http://www.developer.com/design/article.php/3317571 :
Quote:
The fundamental advantage of OO programming is that the data and the operations that manipulate the data (the code) are both encapsulated in the object. For example, when an object is transported across a network, the entire object, including the data and behavior, goes with it.
Um, what?

Let's try and play this out practically. Let's say I have a C++-compiled program as the client, with some data, and it encapsulates that in an object.

On the other end, I have the server, which might be written in, say, Java. It then receives the object.

How the heck does that work? How could a Java server understand the behavioral annotations in the object? Sure, if you were to come up with some language-agnostic format for describing behaviour, say, XBL, and wrap it in that. But that's not what the article is saying.

The author seems to imply that you could transmit the methods of an object as part of the object. I would argue that's impossible.

Anyone care to clarify?
  quote