Forum OpenACS Development: Re: acs_atributes usage ?

Collapse
20: Re: acs_atributes usage ? (response to 1)
Posted by Barry Books on
It would be nice to firm up the object model and 5.0 might be a good time to do that.

I have some code but it's not really good for general use. It's built to render forms with more than 100 objects. I tried using ad_form but it was too slow. I do have code for building obects/attributes, validation etc. I have repackaged some of that and would be more than happy to make that available.

I would like to work out what people would like from the object system. After working on the validation package I think it's easy to make it worth while to create objects. Just being able to validate data with ad_page_contract is a big win.

Perhaps we should start a object model requirments thread but the way I see it the requirements would be. (in order of importance)

 Web base object builder
 auto build database objects from acs_objects
 auto build generic validate routines for all data
 auto build ad_page_contract validate routines
 make object_types and attributes acs_objects
 auto build "form widgets" and ad_form for objects
 dump code to file
 search objects
 make all this subsite aware
It would also be nice to add allow objects to contain other objects but that complicates things. The system I wrote allows this in special cases. The most useful case it just add object_id to acs_datatypes and allow 1 level of nesting. The next thing would be to really add the ablity to have mulitple data for an attribute. The attributes table seems to imply that you can with min_n_values/max_n_values. It would be nice if this worked then you could for example have a contact with a person, 0-5 addresses and 0-5 phone numbers.

Other features that could come latter

 Generate XML schema for an object
 Dump XML data for objects
 Import XML data for objects
 Syndicate objects from one acs system to another
All of this could be done as an addon module or built into the core. The first set is enough to allow a person with no database abilty (or a lazy programer) to create pages that gather data from forms and search it.