Moving objects...

Josh Flowers josh at i33.com
Fri Jul 23 16:30:22 UTC 1999


That's what I get for not stopping off at the coffee shop before  
work.  But, since the cats out of the bag, and I've admitted that I'm  
actually thinking, let me pose a question I've been pondering...  Do  
we as programmers put to much "thinking" logic into most of our  
objects?  By that I mean are there too many methods that do not  
involve dealing with the state of an object, but are more or less  
algorithms attached to an object.  For instance looking at the  
methods of the String class I would have to guess that 2/3 of them  
have nothing to do with accessing, or modifying a string.  The string  
method that I brought up a few weeks ago was >>  
lineCorrespondingToIndex.  This method simply uses a string, it could  
just as easily be in a library, and take the string to search as  
it's first parameter.  By attaching these algorithmic methods to  
objects, do we unduly burden them?

Just something I've been pondering.

> Since the recent discussions on making Squeak more modular, I've   
> been pondering some of the same sorts of issues, so if you receive   
> any information that isn't sent to the mailing list, I'd love to see   
> it.  Also, what book did you read on modile objects, and was it good?   
>  Thanks.
>
> > I have been reading a book on mobile objects, and some of the
> limitations of
> > the technique. It made me wonder about how Squeak and Smalltalk   
> deal with
> > these issues (rather better I suspect). Firstly, Java will not   
> allow threads
> > to be serialized. Is the same true of Processes in Squeak? Can  
these be
> > saved and restored to their execution state in a different image?   
> This is
> > important for the idea of mobile software agents. The reason this is  
> > probably difficult in Java is because it uses native threads.
> >
> > Secondly, with passing objects from one image to another. Passing   
> the state
> > seems fairly straightforward, but what about behaviour? If an
> Instance of
> > class Dog is shipped to a remote Image that does not have this   
> class, what
> > happens? In Java, a classLoader fixes the problem. In Smalltalk, I'm  
> > guessing you can just pass the class across the net to add the   
> behaviour
> > (shows that making a class an object was an excellent design
> decision). Is
> > this the case, or is more needed? Does SmartReferenceStream deal   
> with this
> > automatically, or must you explicitly add the class to the remote   
> image?
> >
> > How are dependencies dealt with in serialization? I think with  
BOSS it
> > streams the object and all of its references to other objects etc.   
> Does the
> > same happen when an object is serialized on the net in Squeak?
> >
> > These are probably very basic questions, but I would like to know   
> how Squeak
> > handles these things...
> >
> >
> > Peter
> >
>
>





More information about the Squeak-dev mailing list