Re: what's the existing projects to save objects?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: what's the existing projects to save objects?

Damien Cassou-3
Hi,

> I search to save an object (and the objects which possibly
> composed it) onto a storage medium ("serialization"?).
> I hope with your great kindness (too much? )  you could give
> me some ways to explore or some names of projects...

"Create your object(s)"
myObject _ {'abc' . 3 . $g}.

"Open a ReadWriteStream (not a simple WriteStream, because of a bug?)"
fileStream _ FileStream forceNewFileNamed: 'myObject.obj'.

"Open a ReferenceStream on your ReadWriteStream"
serializeStream _ ReferenceStream on: fileStream.

"Use #nextPut: and #nextPutAll: to put all your objects into the "
"reference stream."
serializeStream nextPut: myObject.

"Close the streams"
serializeStream close.
fileStream close.


"Here are the steps to get your objects back"
fileStream _ FileStream fileNamed: 'myObject.obj'.
serializeStream _ ReferenceStream on: fileStream.
myObject2 _ serializeStream next. "Use #next to get your objects back."
serializeStream close.
fileStream close.

Bye

--
Damien Cassou
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: what's the existing projects to save objects?

markaufflick
I (also a squeak/smalltalk newby) am loving GOODS - a free object
database. The driver does all the conversion for you - you just stuff
an object into the database and get it out later.

See: http://minnow.cc.gatech.edu/squeak/3492

and: http://www.garret.ru/~knizhnik/goods.html

/Mark



On 6/24/06, Damien Cassou <[hidden email]> wrote:

> Hi,
>
> > I search to save an object (and the objects which possibly
> > composed it) onto a storage medium ("serialization"?).
> > I hope with your great kindness (too much? )  you could give
> > me some ways to explore or some names of projects...
>
> "Create your object(s)"
> myObject _ {'abc' . 3 . $g}.
>
> "Open a ReadWriteStream (not a simple WriteStream, because of a bug?)"
> fileStream _ FileStream forceNewFileNamed: 'myObject.obj'.
>
> "Open a ReferenceStream on your ReadWriteStream"
> serializeStream _ ReferenceStream on: fileStream.
>
> "Use #nextPut: and #nextPutAll: to put all your objects into the "
> "reference stream."
> serializeStream nextPut: myObject.
>
> "Close the streams"
> serializeStream close.
> fileStream close.
>
>
> "Here are the steps to get your objects back"
> fileStream _ FileStream fileNamed: 'myObject.obj'.
> serializeStream _ ReferenceStream on: fileStream.
> myObject2 _ serializeStream next. "Use #next to get your objects back."
> serializeStream close.
> fileStream close.
>
> Bye
>
> --
> Damien Cassou
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>


--
Mark Aufflick
 e: [hidden email]
 w: mark.aufflick.com
 p: +61 438 700 647
 f: +61 2 9436 4737
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: what's the existing projects to save objects?

Mark Aufflick-6
In reply to this post by Damien Cassou-3
I (also a squeak/smalltalk newby) am loving GOODS - a free object
database. The driver does all the conversion for you - you just stuff
an object into the database and get it out later.

See: http://minnow.cc.gatech.edu/squeak/3492

and: http://www.garret.ru/~knizhnik/goods.html

/Mark

On 6/23/06, trolat.florent <[hidden email]> wrote:

> Hi all,  :)
>
> I search to save an object (and the objects which possibly
> composed it) onto a storage medium ("serialization"?).
> I hope with your great kindness (too much? )  you could give
> me some ways to explore or some names of projects...
>
> Thanks, Flo.
>
> Accédez au courrier électronique de La Poste : www.laposte.net
> 3615 LAPOSTENET (0,34 €/mn)
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>


--
Mark Aufflick
 e: [hidden email]
 w: mark.aufflick.com
 p: +61 438 700 647
 f: +61 2 9436 4737
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: what's the existing projects to save objects?

stéphane ducasse-2
In reply to this post by Damien Cassou-3
You have SIXX on SqueakMap
        it saves objects are binary wrapped with XML

I guess but I did not find the time to look at SRP that there is  
something there too.

You should not be impressed and dare to ask questions to squeak-dev :)

Stef

On 22 juin 06, at 19:01, trolat..florent wrote:

> Hi all,  :)
>
> I search to save an object (and the objects which possibly
> composed it) onto a storage medium ("serialization"?).
> I hope with your great kindness (too much? )  you could give
> me some ways to explore or some names of projects...
>
> Thanks, Flo.
>
> Accédez au courrier électronique de La Poste : www.laposte.net
> 3615 LAPOSTENET (0,34 €/mn)
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners