On Sat, Sep 3, 2011 at 2:54 PM, graham telfer <gakousei53@hotmail.com> wrote:
Hi there,
I completed the Bank Account tutorial written for Squeak. It worked fine but I have a question about persistence of data. After I built the bank account and gave it a balance history I saved and quit. Later I wanted to go back to it. The account and its details were gone and I could only create a new account.
How is data saved across sessions in Pharo?
I am bit puzzled by your question, since when you save Pharo image, all your objects get saved, and when you load that image they are still there live and kicking. Your example sounds like it is for Seaside (since you mention sessions) - which is web development framework. If that is correct, seaside expires sessions after some time, for obvious reasons. So you should make your data objects accessible from the seaside application, not just current session. Aside from that, if you would like to store your object also _outside_ of an image, there dozens of ways to accomplish that task. From simple serialization to binary files (fuel and friends), serialization to XML, object smalltalk databases (SandstoneDB, Magma), NoSQL databases (CouchDB, and similar), to relational databases. Davorin Rusevljan http://www.cloud2'08.com/