Top "Design-patterns" questions

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

Business logic in MVC

I have 2 questions: Q1. Where exactly does "business logic" lie in the MVC pattern? I am confused between Model and …

design-patterns model-view-controller business-logic business-rules
Ways to eliminate switch in code

What are the ways to eliminate the use of switch in code?

design-patterns
When to use which design pattern?

I like design patterns very much, but I find it difficult to see when I can apply one. I have …

c# design-patterns
Is there a typical state machine implementation pattern?

We need to implement a simple state machine in C. Is a standard switch statement the best way to go? …

c design-patterns finite-automata
Python and the Singleton Pattern

There seem to be many ways to define singletons in Python. Is there a consensus opinion on Stack Overflow?

python design-patterns singleton
How to implement a FSM - Finite State Machine in Java

I have something to do for work and I need your help. We want to implement a FSM - Finite …

java design-patterns state-machine fsm state-pattern
Implementing Singleton with an Enum (in Java)

I have read that it is possible to implement Singleton in Java using an Enum such as: public enum MySingleton { …

java design-patterns enums singleton
What's an Aggregate Root?

I'm trying to get my head around how to properly use the repository pattern. The central concept of an Aggregate …

design-patterns repository-pattern ddd-repositories aggregateroot
Thread Safe C# Singleton Pattern

I have some questions regarding the the singleton pattern as documented here: http://msdn.microsoft.com/en-us/library/ff650316.aspx …

c# design-patterns singleton