Tomas Baran
Mar 1, 2022

Thanks for your answer. I was told by some developers that in big projects they usually have one singleton, two at most. With this minimalist we can easily end up with 40, 50 or even more Singletons which sounded like a no-go to them. I can't tell myself, I don't have enough experience.

I mean their explanation makes sense. Basically you want the least possible global variables (not to overload the memory/CPU), and with the Minimalist approach you end up having lots of unnecessary global variables — albeit necessary for the architecture purposes. I guess there is a consensus here. The question I have, is it really that important? Does it really have that much of an impact on memory/performance. Maybe it doesn't in small apps but does in big apps. So then, when does it start to be a problem?

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Tomas Baran
Tomas Baran

Responses (1)

Write a response

I've never run into this problem, so my answer below is only theoretical.
Even in a large app with 40 or 50 pages, you would be unlikely to have 40 or 50 singletons. The reason is that in GetIt you usually define them as lazy singletons. That means…