I have never worked on Swing API so would like some advice from ranchers. In a browser based application we use a no of jsp,servlets etc so we have a no. of components .How is it handled in swing.
I think for swing can it be just be one class(having main method ) with all the menubars ,buttons etc. on it(of course it might be delegating some control to some small helpers).I am just imagining that user will always be interacting with one window(which might display different screens depending upon button,menu clicked) as opposed to web application .
A swing application makes use of JFrames to implement User Interface Windows. So each web page can be thought of as a Frame. The Frame has controlls like buttons etc, which generate events (AWT events) There are event listeners that need to be implemented to handle the event.
I haven't seen a real MVC architecture refering the Swing implementation, like the petstore example. However I would seperate the view from the controll by having a control listen to the events from the GUI and the controll delegate to a custom Action to handle the event. The action can use a BD to connect to the Business Tier which can again use a SL etc...
Hi Ajai, I would reckon not to go too detail into the swing application design. That's just another client, like the web client. So you can architect with the web client in mind and can then document how your swing client is going to connect to the EJB tier.
As with the SCJD, Sun vary the requirements in order to raise at least one area with the student that is unknown (i.e. in your case JFC/Swing). Mine was something different but the purpose of varying the requirements on various technologies is so that the student has to go and investigate the technology as part of assignment.
There is little point asking people in the forum what the design should be as this is YOUR assignment not theirs! I suggest you do the same as the rest of us and visit the Sun site on Swing on buy a book!
By the way, you do need to know the related design patterns because you may want to include the components in your component diagram, along with any necessary pattern that delegates services to your main [server] application.
Hope this helps - not intending to be rude but please use the assignment to learn (as it was intended). It is far too easy simply to ask someone else and you will not learn anything by doing so.
Ian Roberts<br />Application Architect<br />SCJP, SCJD, SCEA, OCUP Fundamental
This looks like a job for .... legal tender! It says so right in this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop