0

I first want to say that I specifically point to this stackoverflow question: enter link description here

There, the accepted answere is

[ ... ] I'm sure there are other valid reasons as well. Alex Miller, in "Patterns I Hate", talks of service locators and client side UI's also being possibly "acceptable" choices.

Now I want, as a kata while comeing back to java after a long(ish) period, write a Mac-like starter bar for other Os [ unix / windows ].

The idea is to dragndrop an application icon onto it (windows) or just run any cmd command (unix) and have multiple clickable items and parameters to start the applications. ( the real-world-use of this prog. is another story lol )

As I understood the accepted answere, the class that fires up the processes (with a runtime or similar) CAN be a singleton. The website linked there is from 2007 -> waybackmashine, so I thought I'd bring this topic up here.

Are there benefits for this, is there ever a benefit to use a singleton over instances other then the so-often mentioned logger? Pls. errata if you have experiance on this topic.

TBC: The post linked specifically says

The information here flows one way: From your application into the logger. Even though loggers are global state, since no information flows from loggers into your application, loggers are acceptable.

  • which would hold true for the application starter in my scenario.

I just want to learn a bit about software architecture, no need for specific implementations.

clockw0rk
  • 519
  • 5
  • 25
  • This is much better for [Software Engineering](https://softwareengineering.stackexchange.com/). – akuzminykh Aug 17 '20 at 18:09
  • yikes! can we move it to there or should i just reopen it tomorrow? – clockw0rk Aug 17 '20 at 23:01
  • You can just delete this one and copy paste the content there. But you can as well keep it here completely. IMO it just belongs there, not here. Maybe others would disagree. Anyways, don't post two questions, which wouldn't be allowed. – akuzminykh Aug 17 '20 at 23:02

0 Answers0