<div dir="ltr">There is no best way.  There are many different ways, each with advantages and disadvantages.<div><br></div><div>Suppose you have a workspace that makes some objects and stores them in workspace variables.   The workspace contains a lot of different expressions that use these variables.  Some of the expressions might assign to one of the variables, some might use them to change the objects stored in the variables, some might pop up windows on the variables, etc.   You use the workspace by selecting expressions and executing them.   You can run the expressions in any order, of course, though often some of them assume that variables have been initialized.</div><div><br></div><div>If you do this, you can use your image as a database.   You can save your image any time you want, and when you restart it, you will be right back where you left off.  All the workspace variables will have the same values they did before.  All the same windows will be up.   Of course, if your machine (or image) crashes then you have to restore the last save, and you lose the work you did since then.   A bigger problem is that the data is hard to give to someone else.  You&#39;d have to give him your entire image.   This is a good way to save data when you are in the initial process of developing your program.  But once you get into the phase where you are using your program to analyze a lot of different data, you probably want a way of storing data to files.</div><div><br></div><div>There are lots of ways of storing data to files.  You could store it as XML or CSVs.  You could store it in a relational database.   The simplest way of storing it is as serialized objects.  The other ways of storing data to files require figuring out how to map objects to the data format that you pick, while serializing objects lets you avoid that work.  On the other hand, it can only be read back by other images.</div><div><br></div><div>Since you are seem to be learning Smalltalk, I would suggest doing everything in a workspace at first, and using your image as a database.   This will force you to learn Smalltalk faster.   When you think you understand it, come back and ask us about all the problems of using an image as a database.  </div><div><br></div><div>-Ralph Johnson</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 4, 2014 at 4:14 PM, Dan <span dir="ltr">&lt;<a href="mailto:dnorton@mindspring.com" target="_blank">dnorton@mindspring.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Howdy,<br>
<br>
A class is instantiated and produces output in a data structure (array, collection, dictionary,<br>
...). Upon each later (maybe months later) instantiation, the previous output is needed as<br>
input. What is the best way to do this for modest (not huge) output? Some possibilities:<br>
    Externally - file out and file in<br>
    Within the class - compile class methods containing the output; save with Montecello<br>
<br>
I&#39;m interested in how to dynamically compile a class method. Can Browser be invoked<br>
dynamically? In studying Browser and friends, it looks complicated. Am I missing something<br>
or attempting something foolish or ...?<br>
<span class="HOEnZb"><font color="#888888"><br>
- Dan<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</font></span></blockquote></div><br></div></div></div>