The Monostate Pattern(jeremyjarrell.com)

submitted by jeremyjarrelljeremyjarrell(2685) 3 years, 9 months ago

A brief discussion of how to implement the Monostate pattern, and what advantages it gives us over the Singleton pattern.

1 comment |category: |Views: 108

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by fquednaufquednau(404) 3 years, 9 months ago 0

Ah, so I 'm actually doing monostate?
Seriously, I always thought Singleton is keeping an single instance of some object. As long as you implement all relevant ops as instance members of said object and give some entry point into your singleton keeper you're still well on your way for testability and all OO glory.

Reply

information Login or create an account to comment on this story