[Zope] Z Classes Tutorial: Rough Draft

Paul Everitt Paul@digicool.com
Fri, 7 May 1999 14:32:19 -0400


Jordan wrote:
> The ZClasses are going to really change a lot of things with how most
> Zope projects are implemented I would think.  One issue I'm 
> interested in
> that you'll probably address fairly soon is how to migrate 
> existing code
> to the ZClasses framework.  I would assume you can place 
> External Methods
> into the Methods area of the ZClass?

Yep.  For instance, imagine a Z Classes-based User object (that goes in
a user folder).  Imagine you drop in an external method that graps
information about the user and, when called, gets more information from
[LDAP|NIS|NT SAM|SQL].  The external method is a behavior of the class
which gets information about an instance.  Pretty neat!

Some other things on the drawing board (but not any time soon):

1) Security on Property Sheets.  Imagine creating a Membership system
where you wanted to sell upsell levels to Members.  If a person owns
their Member object (so they can change their email address and other
properties), then what stops them from changing the upsell level?  With
access control on property sheets, you segregate the privileged
properties to a sheet which they can't edit.

2) Property Sheets, schemas, and forms.  Imagine properties being richer
objects with things like:

  o constraints -- don't let values over 100 in here

  o title -- when used in an input form or report, display this

  o widget -- what HTML widget to use when collecting info (e.g. SELECT)

With this information you can create better wizards to help make forms.

3) Better wizards.  Jim has cooked up one and we talked about what else
we can do.  For instance, have a multi-step wizard (like Z Tables) that
asks questions and provides information, such as:

  o Step 1 -- Here is an overview of what we are going to do

  o Step 2 -- What do you want to call this class

  o Step 3 -- Do you want to base your class on other classes?

  o Step 4 -- What are the basic properties to collect when adding a new
Foo?

  o Step 5 -- What are the types of the properties you named?

  o Step 6 -- Create

  o Step 7 -- Finish (or advanced, such as views)

...and splat, you have a new Foo class.  I'm hoping to get this in range
of people that want to "store their kinds of things".

All of this is at least a couple of months off, unless someone submits
patches :^)

Thanks for the input!

--Paul