• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Architecture question...

Igor Romanov
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?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic