Originally posted by Roger Rustin:
Hi all,
I've almost completed the SCEA assignment. I intentionally didn't handle the swing application part initially since it's my weatkest part. I followed java petstore example and my solution is based on that.
I'm not sure how to handle swing application. Petstore example doesn't shed any light on it and I have no work experience in swing. I know swing client will interact with something like SwingClientApplicationHandler which in turn will pass the requests to the business components.
On web based application I have a mapping.xml which guides what should be next jsp page for a given event. How to handle that scenario in swing? How to map for which event what should be next screen in swing. Any pointers will be appreciated.
thanks.
- Roger
Hi Roger,
I had worked on a swing based application 3 yrs back..so my knowledge might be a little outdated. But here goes, anyway..
A swing based app usually has a main window and a series of 'tabs', which are enabled and disabled depending on events. There is basically a Controller object in Swing too, which works with a CommandHelper, that decides what action to take based on event. All buttons have eventHandlers which subscribe to various events. After the action is complete, the Controller enables/disabled tabs and its button depending on results.
For example..at the completion of selectFlight event, the Controller would
issue a command like:
selectSeatTab.enable(true);
selectSeatButton.focus(true);
searchFlightTab.enable(false);
etc ..etc
I think for this assigment, you do not need to go about designing the swing app..there isnt enough information to help you design it anyway. I think its more important to show the appropriate hooks in the system whereby the swing app communicates with the web/business tier. I think one of the goals of this assignment is to see how smoothly we integrate multiple clients, rather than to show how we can design multiple clients.
Hope this helps..
Parag