• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Client service

 
Jane Wang
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my rough design, I want to use a class to act as a client service. It is just like a servlet that gains all events from UI and decided what to do next. But there are some problems:
1. In order to let all my UI pages know the service, I need to pass it as an argument whenever creating a new GUI. It seams not so comfortable.
2. If I move all GUI event handling into service, the communication between windows becomes inconvenient.
Is there any solution to make it more efficient and logical clear?
[ March 26, 2002: Message edited by: Jane Wang ]
 
Laudney Ren
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by UI pages??
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jane - While that type of design works for Servlets, it's different for Swing. In Swing all those features are provided, in some other sort of way. The model design for Swing is MVC. This is like the service in that service is a class called a controller. It knows about the GUI, all the actions, and what to do when an action occurs. It is actually a lot more cleaner that Servlets, and their service/getPost etc.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic