General problems with software project

dont ask, why i need to write a program like this but first i try to explain:

imagine a 3-tier software for managing user data. the architecture shall be to have
various clients (swing-application, jsp etc) which connect to a remote application
layer and get a pre-configured gui.
so as an administrator your able to configure a xml-file which list so called “plugins”.
these are no more than classes describing which gui elements should be present
on all clients (e.g. Plugin1: 2 labels, a Textfield and a Combobox) and provide validation
control.
the application layer loads all plugins and the plugins can ask the layer to create their
gui elements. the application layer contacts different deployment adapters to build the
guis: the-swing adapter builds components on containers, the jsp-adapter creates the
http-file etc.
at least, theres a persistance-layer for saving the dynamic value objects to a db, an xml
file whatever.

jsp                                          swing-app                                                         (Thin Clients)
[via http]                                      [via rmi]
     |                                                  |
     |                                                  |
   jsp-adapter                            rmi-adapter
                   [application layer] ----------[xml:loads]-------------------> Plugin1 .. PluginN  (with validation control)  
                          |                  |
                    [xml-DAO]     [db-DAO]
                               (....)

up to now this is not a dynamical process so a system is not reconfigured at
runtime.
now to the problem:

  1. a plugin is loaded (1 textfield, 1 combobox, 1 label)
  2. app-layer calls deployment adapters which create concrete guis
  3. guis are transferred by request of http or rmi
  4. user enters data into gui and sends them back

but which is the best way to store the data in a value object?
you could store them into a collection type via wrapper classes
(textfield:String, combobox:Integer, label:String). too complex gui
elements are not supported (table etc.). this collection would be
returned and should be validated by the correct plugin (the ‘source’),
this can only happen by marking gui elements and plugins with ids,
so that it is clear which set of user data is from which plugin, and
which object belongs to a certains gui element.

i dont think its a good solution so far, but if you need to pass this
value object to the persistence layer the IDs are no help anymore.
because without the knowledge of the plugins i see no good way
to know which datatype which object within the collection has …

to clear it, its not my idea of software but it has to be done. but im open
for suggestions on techniques, patterns, frameworks!!

actually we have done a server/client framework like this in estimated four man years… good luck! :wink:

but seriously, here is our approach, maybe you can make use of some of it:
we use a flat datastore of named “fields”. for each field there is a descriptor object containing some aspects of the field like the format regex, the target class along with a converter object to convert the input-string to the target class, a validator to allow for more complex validation (like date-constraints, etc) and the error messages for the different failure scenarios.

so if a “form” is requested by the application GUI, the plugins are asked to fill in a list of these descriptors along with the creation of the GUI components. the user application just sends back strings that are “committed” by iterating through the descriptors and the fields get validated and converted for storage in the persistence layer. If something went wrong, the requested form is redelivered augmented with the error messages from the failed “commit”.

as I said, we have a working framework for such kind of things (and much more, like an extendable scripting language, graphical “user dialog”-editor, action framework, etc.), so if you are interested, contact me at mathias[dot]henzeskytecag[dot]com.

I hate “contact our sales department for pricing” statements, so I’ll be honest to say that licence fees are around 8000€ per CPU for the framework and around 4000€ per developer for the SDK. Unfortunatly there are only german techpapers available for now, so I can’t give more information at this point.