[Seaside] Re: Seaside & Ruby Rails Compared

Victor Rodriguez victor.palique at gmail.com
Fri Sep 9 04:27:00 CEST 2005


Hello Colin, Gunther, list,

2005/9/7, Colin Putney <cputney at wiresong.ca>:
> 
> On Sep 7, 2005, at 7:23 PM, goran at krampe.se wrote:
> > Hi!
> >
> > Well, I would say class variables is the "most common" way to hold
> > onto
> > "global state".
> > For example, SMSqueakMap holds your map in a class var called
> > DefaultMap.
> 
> True, but I wonder if this goes to the question...
> 
> Victor, you don't have to do anything special to "keep your object
> instances inside the image." Try this experiment:
> 
[experiment snipped]

Thanks for the nice experiment Colin. My question was more in the
lines of Gunther's (and others) reply.  I understand the image
concept, I'm not that of a newbie :-)

Indeed, I thought that the way to use the image for persistance
involved something along the lines of storing an object into the
global dictionary Smalltalk.

I understand how a class variable can be used for the same purpose
(storing a collection or a singleton instance), however this method
seems to be a bit "dangerous".

My concern is that it is very easy to blow away the  object holding
the data. I guess I need to play around, but I suppouse you initialize
the class variable in a (class-side) initialize method, then call this
method using the workspace or some such. Will a class variable set
like that survive a file-in?

I think part of my hesitation comes from the fact that, coming from
Java, I still find it hard for things to survive from one run to
another :-)

BR,

Victor Rodriguez.

> 
> Hope this helps,
> 
> Colin
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>


More information about the Seaside mailing list