[ZPatterns] ZPatterns not TTW, step 2
R. David Murray
[email protected]
Sat, 9 Jun 2001 17:50:36 -0400 (EDT)
So I've succeeded now in instantiating a Specialist subclass. I've
also succeeded in creating a subclass of DataSkin, and by copying
the black magic out of the bottom of DataSkins.py, I have gotten
my class to appear in the storage dropdown in the rack. I was even
able to call manage_setStorage to make my class the selected class
in the defaultRack.
Now I believe I need to add PropertySheets to my class in some
fashion so that I'll be able to do manage_changeProperties and
whatnot to modify the properties that need to be managable through
the CRM interface. Or is there some more straightforward way to
modify properties that still hooks in to the ZPatterns machinery,
given that I intend to have all of the code in a Product? If I do
have to create a PropertySheet, how do I do it? Am I just asking
too much to want to do this from Python code and not TTW? I think
the answer probably lies in the black magic in DataSkins.py, but
it looks a little daunting to figure out at the moment, especially
since I've never investigated the details underlying normal ZClass
PropertySheets. So I'm hoping someone can at least give me a leg
up in the right direction.
To let you know where I'm coming from design wise (in case anybody
has any suggestions), what I'm creating here is a very simple-minded
Customer Relationship Management system. I have three types of
customers internally, and my current design has a Customers Specialist
that I'm thinking will provide the CRM interface view of the
merged customer base. I want to retrieve objects from one of
the three customer dbs (presumably these will be Specialists
themselves) and return something with a well defined interface that
the CRM system can work with. Does this make sense design wise?
I'm thinking that what backs certain interface routines will be
different for each of the three customer dbs, but I think that just
means I have to have the Customers Specialist do the right attribute
assignment magic (maybe using some glue functions) depending on
which customer db the source info comes from. (I don't think
there's any way currently to do SkinScript from the filesystem, so
I'm resigned to having to code that TTW, but I'll be happy if
someone says there is a way.)
--RDM