This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Architecture question...  RSS feed

 
Igor Romanov
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently had a problem while creating a swing application.
A general idea is to provide a "client" to manage a sort of "remote server".
Ok, first app. had been created in a way when it can manage only one server, you need more - run more apps...
But then I decided to rewrite to have one app with multiple JFrames, representing connections to different server. So I now thinking on modifying the classes which had been singletons or only provided a static interface, like ActionManager, AppLogger, ... etc. the idea is that they should have one instance per session (window) and be easily accesible.
So that smth. like ActionManager.getAction("ActionId") could be performed but now I need one ActionManager for each main window...
Of course it is obvious solution just to create an instance inside, say, MainWindow class and just pass the reference on it everywhere and to create all the getActionManager(), getXXXXX in MainWindow...
But I'm looking for anything better...? Maybe some pattern?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!