• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Swing

 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

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 .


Can anybody clarify.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There are many design patterns being use in SWING application as well: such as MVC, Event Handler, Observer, and so on.

You should be able to map it closely to a web application.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

Regards,

 
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
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic