Top "Design-patterns" questions

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

When should I use the Visitor Design Pattern?

I keep seeing references to the visitor pattern in blogs but I've got to admit, I just don't get it. …

design-patterns visitor-pattern
What is MVC and what are the advantages of it?

I found What are mvp and mvc and what is the difference but it didn't really answer this question. I've …

model-view-controller design-patterns
Facebook Architecture

I have been scrounging for articles/info about the architecture at Facebook, the challenges & ways they tackle them. What …

facebook design-patterns architecture
JavaScript pattern for multiple constructors

I need different constructors for my instances. What is a common pattern for that?

javascript design-patterns oop
Can any one provide me a sample of Singleton in c++?

I write a singleton c++ in the follow way: class A { private: static A* m_pA; A(); virtual ~A(); public: …

c++ design-patterns singleton
How to explain dependency injection to a 5-year-old?

What is a good way to explain dependency injection? I found several tutorials on Google, but none of them that …

design-patterns dependency-injection inversion-of-control
Best way to build a Plugin system with Java

How would you implement a Plugin-system for your Java application? Is it possible to have an easy to use (for …

java design-patterns plugins frameworks plugin-architecture
AngularJS: Understanding design pattern

In the context of this post by Igor Minar, lead of AngularJS: MVC vs MVVM vs MVP. What a controversial …

javascript angularjs design-patterns architecture client-side
Marker Interfaces in Java?

I was being taught that Marker interface in Java is an empty interface and is used to signal to compiler …

java design-patterns marker-interfaces
Replacing if else statement with pattern

I have a if else statement which might grow in the near future. public void decide(String someCondition){ if(someCondition.…

java oop design-patterns