Forum OpenACS Development: Re: User contact information

Collapse
Posted by Jade Rubick on
I'm not as experienced in the core as many other people here, but if I was implementing this from scratch, the first thing I would think of is to create a separate table, like Malte suggests, and then create an admin UI which allows admins to dynamically add and remove columns from this table.

This actually wouldn't be too hard to do. In project-manager, I use this to add custom fields to the projects table:

select content_type__create_attribute(
        'pm_project',
        'customer_id',
        'integer',
        'Customer',
        'Customers',
        null,
        null,
        'integer constraint pm_project_customer_fk references organizations'
);

This associates a customer with every project.

You could create a UI to allow admins to add in columns dynamically.

Then, you could have a reference to telecom-number, postal-address, or any other UI. The downside is that it's not user friendly at all, but is mostly geared towards developers.

Which is actually big enough of a disadvantage that I'd consider doing something else.

Just a thought.

Collapse
Posted by Andrew Piskorski on
Jade, a web-based admin UI which directly adds and drop columns from tables?? Generally speaking, yuck!

An interactive UI like that means that nothing is repeatable, nothing is scriptable. My Dev, Staging, and Production data models may all end up slightly different and I won't even know it without specifically digging through the live schemas looking for discrepencies. Rolling out a new site update from Staging to Production will mean manual instructions - "Go here, type this, click on that" - interspersed with running the upgrade scripts. Sometimes you end up stuck with that sort of thing, but it's to be avoided, not preferred.

Now, if you instead want a web UI to collect and record specifications or other info with is then dumped to a file and used to drive an automatic script, that I could see! When it comes to DDL (stuff that changes your database schema), IMNSHO any web UI should, at most, help the human user define what needs to be done, never directly change stuff itself.

I have probably oversimplified and overstated the case, but that's definitely the gist of my experience.

Collapse
Posted by Tom Jackson on

I agree, but doesn't this happen with groups admin UI, and what is invisioned for CR/CMS? Nothing substitutes for a file which contains the datamodel, pl code, triggers, etc. so you can inspect them.