GithubHelp home page GithubHelp logo

ehtiramabdullayev / design-pattern-reloaded Goto Github PK

View Code? Open in Web Editor NEW

This project forked from forax/design-pattern-reloaded

0.0 0.0 0.0 22.96 MB

Implementation of GoF design patterns using Java 17

License: MIT License

Java 100.00%

design-pattern-reloaded's Introduction

Design Patterns Reloaded

Implementation of some design patterns in Java 17, some of them are from the GoF, others are the one you usually see in programs.

Like most of the GoF patterns, the implementations use delegation instead of inheritance, but also emphasis immutability when necessary.

  • abstract factory abstracts access to several factories
  • adapter to see an object from one interface as one from another interface
  • builder constructs objects by name instead of by position
  • chain of responsibility constructs a pipeline of objects that handle a request
  • command, objects that are actions
  • decorator dynamically adds behavior to an existing object
  • factory abstracts the creation of objects
  • memoizer caches the result of a computation to avoid multiple re-computations of the same value
  • monad wraps multiple disjoint states under a common API
  • observer de-couples codes by pushing the values from an object to another one
  • proxy see decorator
  • singleton see abstract-factory
  • railwayswitch abstracts a cascade of if ... else
  • state delegates API implementation to an internal state object
  • template_method define a behavior with a generic part and a specific part
  • typing, 3 kinds of relations between a static type and a runtime class
  • visitor, specify operations on a hierarchy of types outside that hierarchy

Old materials

I've done a presentation in English at Devoxx 2015

Corresponding slides used for my presentation at ParisJUG in June 2015.

NB: A port exists in Scala

design-pattern-reloaded's People

Contributors

blemale avatar forax avatar romus avatar seblm avatar yannmoisan 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.