|
From: Blake W. <bl...@ph...> - 2003-02-09 23:38:34
|
> On the subject of comments and what have you, have any > of you had a look at Vellum ? Not yet, but I will now... Okay, my initial thoughts are: The Audience is pretty much what I had come up with before, although that's a great name for it. The custom fields are an interesting idea, but I think they're a hang-over from C, since in Python you can add any fields you want to any object, so there should be no reason to have them there. It's tied down to bsddb, which bothers me, because I can't hand-edit the files, and because people are suggesting that it get replaced with other things. http://mail.python.org/pipermail/patches/2002-July/008828.html I can see what it's trying to do with the vellum.functions and it's a neat idea. We might want to use that, Wari. (calling vellum.cgi?a=foo will run the function named vellum.functions.foo, apparently with the form as a parameter. I'm not sure I entirely like it, but it's very similar in concept to our py dictionary. Actually, I think the vellum.Entry.Entry is closer to our py dictionary, but you get the idea.) > p.s. I do prefer pickle over xml. It is so much easier. Easier to write to the data files with vi? As a programmer, none of you will have to write the code to read or write XML. I'll do all of that coding for you. In fact, I'm half done. http://www.latte.ca/cgi-bin/source.py?name=file If anyone wants to write the code that uses it, let me know, and I'll forward you my test scripts, which will provide a pretty clear explanation of how I think the storageApi will be used. I did some tests with adding and removing data, and it was on the order of 0.02 ms to call get, passing it a type of Storage.COMMENTS on a document with three comments. I don't know if that scales yet, but I've got a whack of sample data from Wari, so I'll run some more tests, and see what happens. I am, however, cautiously optimistic. Further changes: Implement store and load in the Storage class, since the format to export and import will be the same throughout all the storage implementations. Also, move the marshal and unmarshal code up into the base, since it will be what's used to implement store and load. Oh, and to make everyone feel a little better, the page at http://www.python.org/doc/current/lib/module-xml.dom.minidom.html (which is the xml-api I'm using) says "New in version 2.0." So it seems like everything we need is included. Later, Blake. |