Joachim, Am 23.07.2013 um 13:25 schrieb "jtuc...@objektfabrik.de" <jtuc...@objektfabrik.de>:
> Norbert, > > for similar purposes (INI-File contents etc.), in order to keep them under > version control in envy, I wrote methods that produced a String that could > recreate the objects when evaluated. Such a piece of text makes for a great > class or instance method that you can compile into some Smalltalk class and > get it under version control together with the code that uses the objects. > > Example: IniFileEntry with iVars #key and #value > instance method: > > creationStringOn: aStream > aStream nextPutAll: self class name; nextPut: $=; nextPutAll: self value > asString. > > Thus you can ask all your IniFileEntries to write their own creation string > onto a Stream and compile that into a method. You can see me talking about > this and other related stuff here: > http://www.objektfabrik.de/Downloads/VASTForum2010/VFM10-04-GetBackToShapre-Tuchel.mp4 > (chapter "Get Everything under Version control, ca. 1/3 through the > recording) > I'm aware that you can do serialization/deserialization yourself. I was asking for something to help along the way because a have quite some model classes to cover. I want a more generalized way of doing it. As often I really think about things _after_ I've sent the mail :) I think I have to options: 1. The most generic one is serializing into Fuel and compile the ByteArray in a method. 2. The most readable one will be using STON and compiling the STON string into a method Maybe I should try both. thanks, Norbert > > m 23.07.13 12:47, schrieb Norbert Hartl: >> I try to untangle my modules. I have a parser that creates a model and a >> tool that uses that model. For testing it is convenient to just generate the >> model and work with it. But this way I introduce dependencies which always >> pulls everything in. >> >> In order to untangle I would need a way to easily serialize the runtime >> model into methods or something similar. Anything that can be transported >> via monticello is ok. I just don't want to have dependencies to present of >> external files. That would just change the problem but not solving it. >> >> Any ideas? >> >> Norbert >> > >