Coder Social home page Coder Social logo

sid-shaha / designpatterns Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 32 KB

Contains example codes of various low level design patterns.

Java 100.00%
design-pattern design-patterns java lld abstract-factory-pattern decorator-pattern factory-pattern observer-pattern singleton-pattern strategy-pattern

designpatterns's Introduction

designPatterns

Factory Pattern

Video Tutorial: https://www.youtube.com/watch?v=EaSfSQ5emow&t=1s

The factory Pattern is a type of creational design pattern. One of the most used design patterns. It is used to hide the object's creational logic.

FactoryPattern

Abstract Factory Pattern

Abstract Factory is a type of creational design pattern. This pattern uses super-factory(factory of factories) that create other factories. It is used to abstract the object creation.

AbstractFactory

Singleton Pattern

The Singleton Pattern is a type of creational design pattern. One of the easiest design patterns. When we need to have only one instance of our class we can use a singleton pattern. For example, creating a DB connection once and sharing it in multiple objects rather than creating new connections every time.

SingletonPattern

Decorator Pattern

Decorator pattern is a type of structural design pattern. Decorator pattern allows us to add new functionality to an existing object without altering its structure. This pattern acts as a wrapper to an existing class.

This pattern creates a decorator class which wraps the original class and provides additional functionality keeping class methods signature intact.

DecoratorPattern

Observer Pattern

Video Tutorial: https://www.youtube.com/watch?v=38Hy7-sv_Zw

Observer pattern is a type of Behavioural design pattern. Observer pattern is used when one of the objects is modified and we want to notify multiple objects about the event that has occured. This pattern has two main actors i.e. Subject and Observer.

ObserverPattern

designpatterns's People

Contributors

sid-shaha avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.