[Zope3-dev] forms and schemas

Steve Alexander steve@cat-box.net
Wed, 19 Feb 2003 14:34:45 +0200


> Have a utility, that fetchs data from a rdb, joining some tables. And I
> will have a set of Zope3-Objects, only carrying an id, and fetching all
> of it's data from rdb.
> 
> To this point, all is easy, I have done a proof of concept allready!

Great.


> But now I decided, that my rdb will change, adding new columns for new
> data, and my Zope3-Object should be able to handle this new
> informations to, withouthaving to change it! (In the best case, it
> would handle this information as it's attributes, each columns as one
> attribute.)
> 
> So I thought, I should build a schema (or more then one, for different
> views/subsets) from the "tablestructur" for having a way to generate
> the forms.

Yes. That sounds like a good approach.

I think you'll be able to do this defining a schema for your table by 
creating a schema as a persistent object (no need for modules).

However, if you want to define views and adapters for your schema, 
you'll need to have your schema available in a module. You'll need 
something like schemagen and a persistent module for that.


> I would be easy to do this just in ZPT, but in this case, I loose the
> posibility to manage my object in other ways (XUL, mxWindows, ...)!
> Schemas seems to me as powerful way to be output-device independent!

Yes.


> I hope I was able to describe the picture to you, in my broken,
> humbling english!

Your English is fine.

--
Steve Alexander