Early previewThis guide is in development. Items tagged verify are still being checked against official docs.
nebx Learn
GitHub
Menu
Home/Learning paths/Hands-on: patterns with live demos
Learning path 5 of 6 · Intermediate

Hands-on: patterns with live demos

Five patterns with an interactive playground and a code sample in every language: the fastest way to see patterns at work.

5 lessonsInteractive demosCode in 6 languagesFree
0 of 5 lessons complete
  1. 1
    Factory Method

    Defines an interface for creating an object but lets subclasses decide which class to instantiate.

    CreationalDemoCodeQuiz
  2. 2
    Singleton

    Ensures a class has only one instance and provides a global access point to it.

    CreationalDemoCodeQuiz
  3. 3
    Decorator

    Attaches new behaviours to objects by placing them inside wrapper objects that share the same interface.

    StructuralDemoCodeQuiz
  4. 4
    Observer

    Defines a subscription mechanism that notifies multiple objects about events in the object they observe.

    BehavioralDemoCodeQuiz
  5. 5
    Strategy

    Defines a family of algorithms, puts each in its own class, and makes them interchangeable.

    BehavioralDemoCodeQuiz