Re: [Zope] Are products the right approach?
Carsten -
1) Should Equipment and SparePart be classes or perhaps instead tables in my RDBMS? (ATM they are classes to facilitate the history/undo functionality in Zope)
I have found Zope's undo feature to be highly unreliable. Just perform a couple operations in sequence, then try to undo the first operation. In my experience Zope throws up its hands and says "I forgot where I put that..." If you want this feature you'll have to do it yourself.
2) Should I make it all as classes (including the Log)?
My only suggestion would be to use either RDBMS or ZODB exclusively. Suppose it comes time to restore from backups. How will you know if your ZODB backups are in sync with your SQL backups? It could be tricky.
3) How do you make relations between objects in Zope? (For use in eg. reporting)
Check out the ZCatalog. For heavy duty reporting, though, you can't beat relational databases. One final remark on classes: using the ZODB gives you a lot more flexibility in modeling physical objects (Equipment, Spare Parts). If I were to use Zope classes, I would try to create a class that is far more flexible, perhaps an "Inventory" class that can behave as any type of inventory. I might even create an "Inventory Type" class that contains information about the various inventory types (maybe the TV people can even add their own inventory types with some well-designed web methods). If you think in terms of a theatre production, you could treat these two classes as actor and director. There may be lots of actors in a production, but only one director (at the root) that tells each actor how to behave depending on their role they have been assigned. I've used this model very effectively in my own development. - Nathaniel
-----Oprindelig meddelelse----- Fra: nwingfield@che-llp.com [mailto:nwingfield@che-llp.com] Sendt: 18. september 2003 17:08
I have found Zope's undo feature to be highly unreliable. Just perform a couple operations in sequence, then try to undo the first operation. In my experience Zope throws up its hands and says "I forgot where I put that..." If you want this feature you'll have to do it yourself.
Okay - the Undo function is no longer required by the customer - just a history list about what has been altered in the records. That, I can easily wite by myself.
2) Should I make it all as classes (including the Log)?
My only suggestion would be to use either RDBMS or ZODB exclusively. Suppose it comes time to restore from backups. How will you know if your ZODB backups are in sync with your SQL backups? It could be tricky.
I think I'll go for the "all RDBMS" and then use pluggable brains. Found out about this thanks to Alexis Roda.
One final remark on classes: using the ZODB gives you a lot more flexibility in modeling physical objects (Equipment, Spare Parts). If I were to use Zope classes, I would try to create a class that is far more flexible, perhaps an "Inventory" class that can behave as any type of inventory. I might even create an "Inventory Type" class that contains information about the various inventory types (maybe the TV people can even add their own inventory types with some well-designed web methods).
Very well thought of. I'm going to adopt this idea. Thanks! - Carsten
participants (2)
-
Carsten Gehling -
nwingfield@che-llp.com