Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 840 times)
0 Members and 1 Guest are viewing this topic.
Offline Serethos

Junior Member




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

<pre>

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]
                               (....)

</pre>

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


Offline cylab

JGO Ninja


Medals: 49



« 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  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (29 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (79 views)
2014-09-10 06:39:09

Tekkerue (39 views)
2014-09-09 02:24:56

mitcheeb (59 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (30 views)
2014-09-07 01:12:14

Longarmx (36 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!