Forum OpenACS Q&A: Re: some basic xotcl and ::xo::db questions

Collapse
Posted by Mark Aufflick on
Thanks for the answers Gustaf.

My expectation wasn't negative, I just hadn't realised how rich the openacs integration was, right down to creating the datamodels. Now if only it transparently handled data model upgrades like Malte was talking about ;)

I also didn't know about some of xotcl's features such as its meta-class implementation and design by contract support.

Collapse
Posted by Gustaf Neumann on
Dear Mark,

i am not sure, what Malte was talking about in detail (i have not looked into details about dynfields, i have no application that uses dynfields, for malte the situation is different in the po context). However, the b´db layer in xotcl-core layer has already some support for data model changes:

- In particular the xo-db-layer supports data model extensions, i.e. additional attributes or tables (if the extension is done via the object layer).

- The xo-db-layer does not support data model migrations (altering data types etc.). Here the problem is actually less the data model migration itself (one could drop the old data model and create a new one), but the data migration, where i have certain doubts that it is feasible to do it fully automatically. I am not sure, if i would trust such a mechanism.

-gustaf neumann

Collapse
Posted by Malte Sussdorff on
I can only second Gustaf's comment. The ::xo::db layer is great an works beautifully (XoDynfields is build upon that work). The missing pieces (although some only makes in context of dynfields):

- Extension tables: object_types can have extension tables in which attributes are stored. These are currently not supported by ::xo::db::*

- Support for multivalue

- Support for categories

- Attribute Elements (which are used to generate the form), taken from Dynfields

This is what XoDynfields has tackled, but if you need none of them or are fine with manually creating your forms, then off you go.

Also, if you want to use the website to extend your class then a proper user interface is missing (okay, im_dynfields provides that).