[Zope3-dev] Back to Job editing

Martijn Faassen faassen@vet.uu.nl
Tue, 3 Sep 2002 22:06:46 +0200


Jeffrey P Shell wrote:
[snip]
> 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.

> It feels more like something
> that would go on an Adapter / Edit View, since targets of web forms, RPC
> calls, etc..., have an easier time calling a single 'update' method that
> doesn't make as much sense on a fundamental business, er, content component
> except as a convenience function (and again - that convenience seems to
> exist more for security/web situations).

There should at least be some utility methods/adapters defined somehere
that can help translating a schema into a set of convenient setters.

[snip]
> I'm not sure what the best practice is, or should be.

It's definitely worth discussing. :)

Regards,

Martijn