<br><div><span class="gmail_quote">On 3/16/06, <b class="gmail_sendername">William G. Davis</b> &lt;<a href="mailto:william_gordon_davis@yahoo.com">william_gordon_davis@yahoo.com</a>&gt; wrote:<br>
</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Right now I have a class that stores objects for later<br>

retrieval in several collections. The persistence is<br>

achieved by making the class a Singleton; it stores an<br>

instance of itself in a class variable and provides<br>

access to the object with a class message (#instance).</blockquote><div><br>
Why not using a global to save the instance, instead of a &quot;Singleton&quot; with class variables?<br>
This is unnecessary in St.<br>
Singleton means &quot;single-instance&quot;, but some people make a wrong use of
this pattern to make well known instances --globals. Note that except
for &quot;null objects&quot;, is very difficult to known if class represents
something unique, so singletons are usually used only for performance
reasons.<br>
&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Is this a bad system? Should I be using something<br>else? </blockquote><div><br>

Except for the singletons it's not bad :), you can design your system
in that way and then add other persistence mechanisms when necessary.
&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Will this cause too much of a headache when<br>upgrading Squeak or transferring data from one machine
<br>to another?<br><br></blockquote></div><br>
Yes :(<br>
Squeak image is not designed as a multi-user, transactional image so
using the image in that way can be a headache when your application
grows.<br>
<br>
Maybe you can use some OODB to solve this problem, (the most used OODB
is GemStone, that is a St prepared for persistence: an image with
multi-user and transaction support, is very powerful but is very
expensive for a small project :(, take a look at:
<a href="http://www.gemstone.com/">http://www.gemstone.com/</a> and <a href="http://minnow.cc.gatech.edu/squeak/1957">http://minnow.cc.gatech.edu/squeak/1957</a> )<br>
<br>
There are some free OODB frameworks for Squeak:<br>
MinneStore: <a href="http://minnestore.sourceforge.net/index.html">http://minnestore.sourceforge.net/index.html</a><br>
Magma: <a href="http://minnow.cc.gatech.edu/squeak/2665">http://minnow.cc.gatech.edu/squeak/2665</a><br>
<br>
<br>
<br>