On Tuesday 21 January 2003 04:18 pm, Vandemoortele Simon wrote: | _Background info:_ | I am writing my very first CGI app in ruby: it's a dynamic photo-album | (yes, i know it's been done before, but how is one supposed to learn ?). | | _Question:_ | I can't seem to decide under what format I should save my photo-album and | could use some pointers. | | _Detail:_ | The album consists of different *sections*, each containing a description | and *pages*. Every page contains the names of the pictures it shows, | descriptions for the pictures and the name of the layout template used. | | _Solutions:_ | Here are a few solutions I considered, as well as my thoughts about them | | - Raw I/O | Invent my own file format and do all the writing and parsing myself; | stupid. | | - XML | Since there's some structure to the document, maybe XML is a good idea | though it might be overkill in this case. | | - PStore | Not really sure how it works (limited info available). | | - Marshalling | Never used it, don't know if it is appropriate in this situation. (In | fact I wonder in what situations it *is* used.) | | | I'd be glad to hear your thoughts about this subject, | Simon Simon, I'd use a YAML::Store-- easy to use, plus structure and raw-form readability. Check out YAML4R: http://www.google.com/search?q=YAML4R -- Bruce R. Williams :: [iusris/#ruby-lang] :: http://www.codedbliss.com 'It does not require a majority to prevail, but rather an irate, tireless minority keen to set brush fires in people's minds.' -- Samuel Adams