Often times, when we need an object that serves for many other objects in the domain we use the Singleton pattern. It is easy but as discussed by many people, its 'globally visible' aspect often causes maintenance nightmare, as we can't easily know which other objects are manipulating the singleton.

Also, undeterministic deletion order of singleton instances is often times problematic.

Singleton pattern, however, has many good points, too:

* Of course, as the name suggests - guaranteed only one instance of the class.
* The service object is there for you when it is needed, without explicit object instantiation.
* The service object is accessible without manual interconnection effort, like passing around reference.

(The last point causes the maintenance problem as described earlier, at the same time.)

Inspired by Java's servlet container, FixtureContainer class solves the above mentioned problem, while preserving preferable aspects of the singleton.

Project Activity

See All Activity >

Follow FixtureContainer

FixtureContainer Web Site

Other Useful Business Software
$300 Free Credits for Your Google Cloud Projects Icon
$300 Free Credits for Your Google Cloud Projects

Start building on Google Cloud with $300 in free credits. No commitment, no credit card required until you're ready to scale.

Launch your next project with $300 in free Google Cloud credits—no strings attached. Test, build, and deploy without risk. Use your credits across the entire Google Cloud platform to find what works best for your needs. After your credits are used, continue with always-free tier services. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of FixtureContainer!

Additional Project Details

Programming Language

C++

Registered

2013-12-02