Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (755)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  General problems with software project  (Read 1399 times)
0 Members and 1 Guest are viewing this topic.
Offline Serethos

Junior Devvie

Java games rock!

« Posted 2006-02-12 18:06:29 »

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
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
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!!

Offline cylab

JGO Kernel

Medals: 180

« Reply #1 - Posted 2006-02-12 19:10:47 »

actually we have done a server/client framework like this in estimated four man years... good luck! ;-)

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]henze<at>skytecag[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.

Mathias - I Know What [you] Did Last Summer!
Pages: [1]
  ignore  |  Print  

DesertCoockie (36 views)
2018-05-13 18:23:11

nelsongames (81 views)
2018-04-24 18:15:36

nelsongames (73 views)
2018-04-24 18:14:32

ivj94 (755 views)
2018-03-24 14:47:39

ivj94 (85 views)
2018-03-24 14:46:31

ivj94 (626 views)
2018-03-24 14:43:53

Solater (101 views)
2018-03-17 05:04:08

nelsongames (182 views)
2018-03-05 17:56:34

Gornova (408 views)
2018-03-02 22:15:33

buddyBro (1068 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!