[Catalyst] post-deployment custom fields in application

Chakkit Ngamsom chakkit at ibiz.co.th
Fri Dec 23 05:43:54 GMT 2011


Hi Bill,

 

As for my style, I'd create another table for custom values which contains
columns "id, key, value".

Doing this way you can store as much custom data as you want without the
need of modification of the database.

 

One thing to keep in mind, this concept will requires more rows per person
it may not good for searching/calculating.

It's best for just store and retrieve.

 

Regards,

Chakkit

 

===================================================

iBiz Network Co., Ltd.

189/109 Soi Krungthep Kretha 7, Huamark, Bangkapi,

Bangkok 10240 Thailand Tel: 0-2184-6935, Fax: 02-184-6938

Website: http://www.ibiz.co.th, http://www.sitepackage.com

 

-----Original Message-----
From: bill hauck [mailto:wbhauck at yahoo.com] 
Sent: Friday, December 23, 2011 02:26 AM
To: The elegant MVC web framework
Subject: Re: [Catalyst] post-deployment custom fields in application

 

Alexander, thanks for the reply.  However, I should have been more specific
in my need.

 

I'd like the custom fields to be available for calculations.  For instance,
custom fields for the project table might include dates for reviews or
expected and actual delivery dates from a supplier.  They could be used to
calculate the difference between the promise and delivery.  I'd like the
database to perform the calculations instead of the application.

 

 

Also, I'm currently limited to using MySQL 5.1 or 5.5.  PostgreSQL will be
an option but in the future.  No Oracle.  No NoSQL systems either.

 

And, finally, I forgot to mention that the "admins" are the application
administrators, not system admins or programmers.  They will be creating
these custom fields through the application itself, not directly in the
database.

 

 

Again, thanks for any help.

 

 

 

----- Original Message -----

> From: Alexander Hartmaier < <mailto:alexander.hartmaier at t-systems.at>
alexander.hartmaier at t-systems.at>

> To:  <mailto:catalyst at lists.scsys.co.uk> catalyst at lists.scsys.co.uk

> Cc: 

> Sent: Thursday, December 22, 2011 2:08 PM

> Subject: Re: [Catalyst] post-deployment custom fields in application

> 

> I'd use a nosql database or the xml feature of PostgreSQL/Oracle/... 

> or just have a large column that takes JSON.

> 

> Am 2011-12-22 20:01, schrieb bill hauck:

>>  Hi.

>> 

>>  I'm building an application--project management system--that I'd

> like to have the application administrators to be able to create 

> custom fields for various tables after deployment.

>> 

>>  For instance, instead of including a hard-coded field for every 

>> possible IM

> or chat system out there, I'd like the admins to be able to decide 

> they only care about AIM and Skype, so they'd add "aim_name" and 

> "skype_name" fields.  Other installations and admins might decide they 

> only care about gtalk and facebook so they'd add those fields.

>> 

>>  The other issue is that I don't want to simply add 10 extra fields 

>> and

> give the admins control of the display name.  I'd like to essentially 

> have a secondary table that holds the custom fields for that table's
primary table.

> So ...

>> 

>>  The person table has a person_custom table to hold the custom fields 

>> and

> data.

>>  The project table has a project_custom table to hold the custom 

>> fields and

> data.

>>  Etc.

>> 

>>  So my question really is what's the best approach?  A secondary 

>> table

> for every table I want custom fields for?  Or a set of static tables 

> where the first holds the field information and the second holds the 

> data related to those fields?  or is there a completely different way I'm
not thinking of?

>> 

>>  For the first way, custom table per table, how do I make DBIx::Class 

>> work

> with that?  I don't want to have to run the model creation script 

> after adding or modifying a custom field; I'd like to have the field 

> available on the fly.  Do I have to give up DBIC for the custom tables?

>> 

>>  Any info is greatly appreciated.

>> 

>>  Thanks,

>> 

>>  bill

>> 

>> 

>>  _______________________________________________

>>  List:  <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk

>>  Listinfo:  <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst>
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst

>>  Searchable archive: 

>>  <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/>
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/

>>  Dev site:  <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/

> 

> 

> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"

> *"*"*"* T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien 

> Handelsgericht Wien, FN 79340b

> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"

> *"*"*"*

> Notice: This e-mail contains information that is confidential and may 

> be privileged.

> If you are not the intended recipient, please notify the sender and 

> then delete this e-mail immediately.

> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"

> *"*"*"*

> 

> _______________________________________________

> List:  <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk

> Listinfo:  <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst>
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst

> Searchable archive: 

>  <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/>
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/

> Dev site:  <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/

> 

 

_______________________________________________

List:  <mailto:Catalyst at lists.scsys.co.uk> Catalyst at lists.scsys.co.uk

Listinfo:  <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst>
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst

Searchable archive:
<http://www.mail-archive.com/catalyst@lists.scsys.co.uk/>
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/

Dev site:  <http://dev.catalyst.perl.org/> http://dev.catalyst.perl.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20111223/a5a925c3/attachment.htm


More information about the Catalyst mailing list