Hello, I'm trying to write a zope3 UI for data in an RDBMS with python business logic. (Hence updates shouldn't go directly to the database; queries are probably best off using the marshalling code in business logic as well, but could use direct query if its especially easy.)
I was trying to adapt Stephan Ritcher's Zope3 book examples, but am getting a bit snarled with escaping from/interacting with the ZODB. For a collection of objects that live in the DDBMS, should I try to implement a collection object that itself lives in the ZODB (inherits from Persistent, implements IContainer), but really performs a query to get its data? Then I need to mark actual contents volatile (?) Is there a hook to set the volatile contents? Also, it would be good to have a simple admin object in the ZODB that has DB connection info. Putting one there and making it accessible via Zope3 seems easy enough -- just inherit from Persistent.... But how do I access this info from, say, my collection object(s). Does Persistent generate a standard key? Or should I have one big "database" object in ZODB that has attributes for the connection, and also attributes for each of the collections. This seems easy enough, but then I wonder if the zcml config will become tricky, as I would have to declare forms for attributes of instances (somehow)? When using the standard forms, I got errors for not setting __name__ and __parent__ on my contained objects. The first was easy enough, but who is supposed to set __parent__? I want to use standard forms if possible for the moment, as I am trying to get up a prototype fast. Eventually I will need a paged view. Is there one out there to use? In general, if there is a good example of something like I am trying to do, I would be grateful if someone could point me to it. - Shaun Cutts _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users