Top "Design-patterns" questions

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

Why is __init__() always called after __new__()?

I'm just trying to streamline one of my classes and have introduced some functionality in the same style as the …

python design-patterns class-design
What is the difference between Builder Design pattern and Factory Design pattern?

What is the difference between the Builder design pattern and the Factory design pattern? Which one is more advantageous and …

design-patterns factory-pattern factory-method builder-pattern
Repository Pattern Step by Step Explanation

Can someone please explain to me the Repository Pattern in .NET, step by step giving a very simple example or …

c# asp.net design-patterns repository
MVC pattern on Android

Is it possible to implement the model–view–controller pattern in Java for Android? Or is it already implemented through …

java android design-patterns model-view-controller
tar: add all files and directories in current directory INCLUDING .svn and so on

I try to tar.gz a directory and use tar -czf workspace.tar.gz * The resulting tar includes .svn directories …

linux bash design-patterns tar
When would you use the Builder Pattern?

What are some common, real world examples of using the Builder Pattern? What does it buy you? Why not just …

java design-patterns builder
On design patterns: When should I use the singleton?

The glorified global variable - becomes a gloried global class. Some say breaking object-oriented design. Give me scenarios, other than …

design-patterns singleton
Naming Classes - How to avoid calling everything a "<WhatEver>Manager"?

A long time ago I have read an article (I believe a blog entry) which put me on the "right" …

design-patterns oop naming-conventions naming
ViewPager and fragments — what's the right way to store fragment's state?

Fragments seem to be very nice for separation of UI logic into some modules. But along with ViewPager its lifecycle …

android design-patterns android-fragments android-viewpager