[ANN]: Tiny Dev Tools for SimplePersistence and STON
I often find myself writing the same boilerplate over and over for my basic persistence needs. My usual pattern is to serialize/materialize a class-side instance variable with accessors of the same name. Some time ago, I added the following to SimplePersistence (IIRC it gets loaded by default): aClass persist: #fieldName which adds the necessary code automatically. Since I've been playing with STON a bit, I created the same in STON-Tools and uploaded to http://smalltalkhub.com/#!/~SeanDeNigris/SeansOutbox. There is even a test ;) Enjoy... ----- Cheers, Sean -- View this message in context: http://forum.world.st/ANN-Tiny-Dev-Tools-for-SimplePersistence-and-STON-tp48... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Sean P. DeNigris wrote
I created the same in STON-Tools
Of course I just realized that they clobber each other ha ha, so now its #simplePersist: and #stonPersist: ----- Cheers, Sean -- View this message in context: http://forum.world.st/ANN-Tiny-Dev-Tools-for-SimplePersistence-and-STON-tp48... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
can you show an example? Stef Le 2/5/15 04:52, Sean P. DeNigris a écrit :
I often find myself writing the same boilerplate over and over for my basic persistence needs. My usual pattern is to serialize/materialize a class-side instance variable with accessors of the same name.
Some time ago, I added the following to SimplePersistence (IIRC it gets loaded by default): aClass persist: #fieldName which adds the necessary code automatically.
Since I've been playing with STON a bit, I created the same in STON-Tools and uploaded to http://smalltalkhub.com/#!/~SeanDeNigris/SeansOutbox. There is even a test ;)
Enjoy...
----- Cheers, Sean -- View this message in context: http://forum.world.st/ANN-Tiny-Dev-Tools-for-SimplePersistence-and-STON-tp48... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
stepharo wrote
can you show an example?
Sure... https://youtu.be/VyuuIthp93k ----- Cheers, Sean -- View this message in context: http://forum.world.st/ANN-Tiny-Dev-Tools-for-SimplePersistence-and-STON-tp48... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
participants (2)
-
Sean P. DeNigris -
stepharo