Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 709957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:33:41+00:00 2026-05-14T04:33:41+00:00

I know what both a Singleton or a Monostate are and how to implement

  • 0

I know what both a Singleton or a Monostate are and how to implement them. Although I can see many uses for a Singleton, I can’t imagine a situation where I would want to let the user create as many instances of my class although in reality only one really exists behind the scenes.

Can anybody help me here? I know that for several reasons one should stay away from both patterns, but in theory, what kind of problems does the Monostate model?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:33:41+00:00Added an answer on May 14, 2026 at 4:33 am

    Monostate, to my eyes, is not a pattern you’re likely to implement at an application level, but can be useful at an infrastructure level. This comment on Alex Martelli’s presentation of the pattern in Python provides an illustrative example.

    Consider a DCOM or .NET remoting scenario, where we have an object on the server representing a Person named Bob. Bob is not a singleton, because Bob is not the only Person. But several clients may be talking to Bob at the same time. In each case, the client does not have a direct reference to Bob (who is in a different address space or on a different machine), but instead has a proxy object. And that proxy object is local to that particular client.

    So we have multiple proxy objects, each with different identity, but each proxying the state and behaviour of Bob the server object — and therefore sharing state and behaviour. If client Alice updates Bob’s state (by calling a method on her proxy object), then client Carol will see changes in Bob’s behaviour (when she calls methods on her proxy object). Alice and Carol’s proxy objects do not have the same object identity, but do have the same state and behaviour: both represent Bob. The two proxies exhibit the Monostate pattern.

    (The whole thread is worth reading for a more detailed discussion, but the above for me was where it clicked into focus.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have simple situation: I know both (user) UID and password and I want
As far as I know both FireFox and Safari can not work with Kerberos
I'm looking to know both what can be customized as well as the recommended
I just want to know why both the paint and draw methods are used
I know C# has both value and reference types, but how can you do
I know of 2 ways to implement the singleton pattern in java and im
As far as I know both the linked list and array can grow without
as far as I know both 2012-07-04T17:30:52+00:00 and 2012-07-04T17:30:52Z are dates in iso8601 format
This question is for the people who know both Haskell (or any other functional
I'm a little confused between the two. As per I know both returns hibernate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.