[Zope3-dev] Back to Job editing

Jeffrey P Shell jeffrey@cuemedia.com
Wed, 4 Sep 2002 08:32:46 -0600


On Tuesday, September 3, 2002, at 11:28  PM, Magnus Heino wrote:

>
>>> Which makes a degree of sense - it's easier to protect a single 
>>> 'update'
>>> method than to allow direct attribute setting.  But, with Schema and
>>> Python 2.2+ Properties, is it still the right way?
>>
>> I hope the right way will change with these new things, but we're 
>> currently
>> in a phase where we're grasping around for idioms concerning this.
>> The broader question is "should I make this a property or a method?".
>>
>> In theory properties/schema help with introspection and I think the 
>> code
>> can look more readable too.
>
> Will it be easy to extend existing types with new properties too?

There's the Annotations system, which I haven't looked at at all (is it 
implemented yet?).

This is the other avenue I want to explore with what I've been playing 
with with JobBoardEx and my extensions - instead of the JobList class 
instantiating the instances of the local Job class directly, it queries 
for an IJob factory to stamp out a new Job instance.  This would allow 
me to subclass and extend Job, while still fitting in with the 
expectations of its container, JobList.  This should be possible today, 
but I have no idea how to spell it.  Or maybe adapters are the right 
way...  *shrug*


--
Jeffrey P Shell
jeffrey@cuemedia.com