Forum OpenACS Development: Attribute Management System (AMS) 0.1a Released

I am happy to announce that Attribute Management System (AMS) 0.1a has been released. You can check it out from cvs. The module name is "ams" and the code is in HEAD.

Description:

AMS (Attribute Management System) helps in customizing your website. It lets you adjust what information is collected and displayed for any package that is integrated with it. AMS allows you to easily and dynamically add attributes to forms and display pages, using a Tcl API or an admin interface. AMS uses the content repository to store attribute history for any object on the system.

Release Notes:

  • This is an alpha sofware release. It is not suitable for production use.
  • This software currently only supports postgresql. I have done development on it with 5.1.x openacs. I have not tested compatibility with other versions of openacs.
  • I think this package will be very useful to the community at large once bugs are fixed.
  • Please file any bugs you encounter in bugtracker. If I don't know about a bug I can't fix it.
  • Please submit feature requests to bug tracker.
  • The address widget included with the 0.1d version of contacts has been incorporated into ams. If you have contacts 0.1d installed please delete this file and restart your server since it will conflict with the ams version.
  • I intend to maintain upgradablility from this version forward.

Todo Before Beta Release:

  • Fix Bugs. I'm sure there will be quite a few.
  • Implement permissions. Each attribute can be individually permission controlled. This will let you restrict access to certain types of information. For example, you may only want managers to be able to see an employees social security number.
  • Allow for the upgrade of current acs_attributes to ams_attributes that are version controlled.
  • Convert documenation to docbook and expand it.

Please read the documention to find out more about AMS. The package Contacts 0.2a which will be released within the next while will be based on AMS and provide an example of how developers can use AMS to do most of the dirty work for them.

Hey Matthew!

this really sounds good, I'm looking forward to see contacts & ams in action ... thanks for the contribution.

Collapse
Posted by Nima Mazloumi on
Matthew, can you explain the difference to categories package?
Collapse
Posted by Jade Rubick on
This is one of the most significant developments in OpenACS this year. This package provides automatic form generation for attributes you add to any acs object. Very very cool!
Collapse
Posted by Matthew Geddert on
Nima, categories just lets you define multiple choice entries for objects, and they have to be multiselect widgets. AMS lets you attach any type of attribute to any object. It takes care of creating template widgets and storing attribute values for you. AMS also provides a Tcl API that lets you easily integrate the attribute values in your pages. Lastly AMS is version controlled and Categories is not.
Collapse
Posted by Lee Denison on

First of all, thanks Matthew, this is great work. I've been looking through the datamodel and the ams package has some nice features. I'm in the process of developing a similar package and, to try to avoid duplication of effort, I'd be interested in merging our work.

My aim with this package, as succinctly as possible, is to allow other packages to offer user definable object types using the AMS metadata and API to generate add / edit / etc forms and process the submitted data. Specifically I've developed a CRM package that will allow administrators to define flexible user profile data that is entered at registration time.

I started from the form metadata code in the CMS package, ie:

  • packages/cms/sql/postgresql/cms-forms.sql
  • packages/cms/sql/postgresql/cms-widgets.sql
  • packages/cms/tcl/form-procs.tcl
  • packages/cms/tcl/widget-procs.tcl

and the attribute manipulation code in the acs-content-repository, ie:

  • packages/acs-content-repository/sql/postgresql/content-type.sql

I won't go into details of functionality or specific requirements in this introductory post but I'm more than happy to discuss them. I'm aiming to have a working version in a couple of weeks but I can send you what I have so far.

I have a couple of detailed questions about your package (I got a good overview from ams/www/docs/index but still had some questions).

  1. How does ams_attribute_values work; is it for use when the acs_attributes storage type is set to 'generic'? is it an implementation of Lars' skinny table spec? (the acs-content-repository code above takes the dml approach and uses acs_attributes 'type_specific' storage type - that was the route I was following).
  2. Why did you choose to make ams_attributes subtypes of acs_object?
Collapse
Posted by Nima Mazloumi on
Matthew,

when do you expect release of Contacts 0.2a and when the final release of AMS?

If I understand you right. In future when creating a new package I define only the objects by myself and all it attributes by AMS? If yes, do you have a small working example I could take a look at (contacts maybe)?

Greetings,
Nima

Collapse
Posted by Matthew Geddert on

Lee,

How does ams_attribute_values work; is it for use when the acs_attributes storage type is set to 'generic'? is it an implementation of Lars' skinny table spec? (the acs-content-repository code above takes the dml approach and uses acs_attributes 'type_specific' storage type - that was the route I was following).

This is my implementation of skinny storage - which is similar to any other ideas for skinny storage. It is a "generic" type of acs_attribute storage that isn't the same type of generic that is implemented in core, its more complex than that.

Why did you choose to make ams_attributes subtypes of acs_object?

Because all the acs_objects i know of used in openacs are subtypes of acs_objects. And they need to be objects because i need them to be able to have permissions.

Nima,

when do you expect release of Contacts 0.2a and when the final release of AMS?

Full AMS should probably happen within the next 2-4 weeks. It is partially dependent on contacts since contacts is being used to test ams functionality. Testing of AMS is needed and right now and if other people can test it and find bugs it might be sooner rather than later.

For contacts I could speculate, but the honest answer is I don't know. I am working on contacts with two other people and I don't have lots of time to work on it, and I don't know how much time the others have. So realisitically within the next 2 months for sure probably sooner than that, possibly significantly sooner than that.

If I understand you right. In future when creating a new package I define only the objects by myself and all it attributes by AMS?

That's right except AMS due to the nature of skinny storage isn't very efficient at sorting data. We are working on the best possible solution with contacts and the response to this issue we come up with will be in the docs. Right now i'm leaning towards ams managing attribute values and updating your acs_object table with sortable field data.

If yes, do you have a small working example I could take a look at (contacts maybe)?

A small working example of contacts is hidden in the ams/www/index.tcl file. Uncomment out the lines. In that example i associated ams_attributes to the ams_list object and then it generates a form and can return the values as a list or in an upvarred array.

Collapse
Posted by Alfred Werner on
For history's sake, I am crosslinking this announcement to this post on forms, metadata, mdev, query-writer, and FORD ...
https://openacs.org/forums/message-view?message_id=82611 hopefully this will help people parse through some of the various efforts in this area.

Thanks to the AMS developers for a cool new package!

Collapse
Posted by Dave Bauer on
One feature I think is important but not in AMS is the ability to extend an object types table. The code would be simplified and for extedning an object type in most cases would be sufficient. It also would make the queries much more efficient  for most applications.
Collapse
Posted by Don Baccus on
Lee and Matthew ...

Seems to me there are two different needs here, and two approaches to solving them are probably OK.

Matthew needs permissions on attributes, which requires them to be objects.  This, however, is a VERY heavyweight way to store attribute values and is not really suitable as a general implementation tool of custom packages and types.

It's one level more heavy than the "generic" acs_attribute storage mechanism, where attribute values are stored as rows in an attribute table.  Matthew's acs-attributes package adds the overhead of an object for each attribute value if I understand this thread correctly.

"type_specific" storage creates a column in a type-specific table.

What would be excellent would be some way to combine approaches along with unifying attribute management for plain objects and CR items, so a client package could just say "render this object using a type template" and have it work regardless of how attributes are stored (the "right" way being dependent on the semantics of one's package).

Dave Bauer's interested in working on this stuff as well.

Should those of us interested in the general object metadata, auto-generation of forms and values, unification of CR/base object Tcl APIs etc meet sometime soon in IRC to discuss?

Collapse
Posted by Matthew Geddert on
I don't store attributes values as objects. I store attribute types as objects. This isn't nearly as heavy weight as attributes values being objects (which I agree would be prohibatively resource intensive if you ask me)... there certainly are significant performance issues involved in this and any skinny storage solution for that matter. I fully agree that we need to make sure this scales well. I really want this package to be heavily used and am willing to modify it to make this possible. Modifying object type tables might be the solution, but it also has drawbacks... we can talk about this on IRC... I agree that we should have a meeting. I'll be on IRC tomorrow (Monday) and set up and meeting time and agenda and then make an announcement.
I'm looking to use/develop a solution that's integrated with the CR for dynamic attributes (adding attributes to an object), AMS does this but not using the CR, what are your future plans Matthew?

Maybe is more related to Lee's work, do you have any updates Lee?

Collapse
Posted by Matthew Geddert on
Roc, Lee's package is the better one for creating pretty static dynamic attributes (meaning you set up the attributes at package instantiation time or for quicly creating custom packages), and AMS is better for attributes that can be added by any user at any time (this possibly createing a huge number of attributes). This thread should hopefully explain the differences between the two and give you an update on where they are headed:

https://openacs.org/forums/message-view?message_id=214574