views:

35

answers:

1

I would like to achieve the following in a configurable manner (that is little or no code modification in order to change behavior) :

Problem Statement :

a) For each part there are a set of key value pairs that can vary

b) The key is a static string label and the value can be one of (text, single select list of values)

c) The system should present an UI to allow entry/modification of values and allow modification(in well defined ways) to the set of key-value pairs allowed for a part

d) The values must be validatable before entry into the database

Constraints :

java(1.4), struts, hibernate, oracle

Are there any open source java based frameworks that can be integrated that could go towards satisfying the problem statement?

I thought that this kind of problem would have been solved but when I research on the web I am not finding any hits - maybe my query is not being properly targeted.

thanks

A: 

What I was looking for was a big picture framework that would also solve this mini-problem along the way. Then it might have made sense for me to pick up and learn the framework.

Also frameworks are useful because the patterns are well thought out and cover gotchas that I might encounter if I were to invent my own.

Since I didn't find one, here is the database design for my problem for which I have also developed a partially working prototype for all the technically challenging questions. At the end I have listed areas I have not yet covered in my prototype (I am not providing the code here for that) but which I don't think would be all that difficult to implement.

To recap, I have a set of parts each of which is identified by a number and has varying properties associated with it in the form of a label and a value. An example of such might be the set of SNPs (single nucleotide polymprphisms) and the label and value would be characteristics of each SNP.

I want to capture those characteristics in an extensible manner.

Table1 : SNP_TEMPLATE

Field Name
TEMPLATE_SEQID
CATEGORY_LABEL
CATEGORY_VALUE
ATTRIBUTE_LABEL
ATTRIBUTE_VALUE
ATTRIBUTE_TYPE
ATTRIBUTE_TYPE_VAL_LABEL
SEQUENCE
MANDATORY

Table2 : SNP_PERSIST

ATTRIBUTE_SEQID
SNP_SEQID
CATEGORY_LABEL
ATTRIBUTE_LABEL
VALUE

venky