Top "Design-patterns" questions

A design pattern is a general reusable solution to a commonly occurring problem in software design.

What is a wrapper class?

What is a wrapper class? How are such classes useful?

design-patterns wrapper
What are the differences between Abstract Factory and Factory design patterns?

I know there are many posts out there about the differences between these two patterns, but there are a few …

factory-pattern factory-method design-patterns abstract-factory
Function in JavaScript that can be called only once

I need to create a function which can be executed only once, in each time after the first it won't …

javascript function design-patterns
Creating the Singleton design pattern in PHP5

How would one create a Singleton class using PHP5 classes?

php oop design-patterns singleton
What should my Objective-C singleton look like?

My singleton accessor method is usually some variant of: static MyClass *gInstance = NULL; + (MyClass *)instance { @synchronized(self) { if (gInstance == NULL) …

objective-c design-patterns singleton object-initializers
Singleton: How should it be used

Edit: From another question I provided an answer that has links to a lot of questions/answers about singletons: More …

c++ design-patterns singleton
How to implement the factory method pattern in C++ correctly

There's this one thing in C++ which has been making me feel uncomfortable for quite a long time, because I …

c++ design-patterns idioms factory-method
Dependency Injection vs Factory Pattern

Most of the examples quoted for usage of Dependency Injection, we can solve using the factory pattern as well. Looks …

dependency-injection factory-pattern design-patterns
How to study design patterns?

I have read around 4-5 books on design patterns, but still I don't feel I have come closer to intermediate …

design-patterns