Tags » Design Pattern

C#: Design Patterns - Singleton

In today’s article I would like to briefly¬†discuss one of the commonly used design pattern in software engineering which is Singleton Pattern. Singleton pattern is usually being used if you are creating a system that only needs… 495 more words


Design Pattern

Basic Understanding

Factory Patternexample

Abstract Factory Patternexample

What is the basic difference between the Factory and Abstract Factory Patterns?

With the Factory pattern, you produce implementations (Apple, Banana, Cherry, etc.) of a particular interface — say, IFruit. 180 more words

Design Pattern

Singleton in Java

What is Singleton?

Singleton is a class that cannot have more than one instance.
(Source: https://en.wikipedia.org/wiki/Singleton_pattern)

In Java, there are many way to create singleton class, one of the example is: 57 more words

Tips And Tricks

Event Queue for Multi-thread Object

0. Background

Actually, this article is an extended one for the last ‘State Machine for Multi-thread Object’. In that article, a scenario of multi-thread object is dressed to described the importance of status machine usage. 130 more words

Design Pattern

Good Code

Recently I come up with this idea of writing a blog which is about programming related things that I will learn during the constant learning process of my life. 303 more words

Best Practice

Singleton using Lazy Holder pattern in Java

package com.sudharsan.examples;

public class Singleton {

private Singleton() {


public static class LazyHolder {

private static final Singleton singleton = new Singleton();

public static Singleton getInstance() {

return singleton;