{
  "api": "design-patterns",
  "title": "Design Patterns",
  "description": "The 23 classic Gang of Four object-oriented software design patterns.",
  "emoji": "🧩",
  "license": "GPL-2.0-or-later",
  "count": 23,
  "self": "https://gratisapi.com/api/design-patterns/index",
  "endpoints": {
    "list": "https://gratisapi.com/api/design-patterns/index",
    "item": "https://gratisapi.com/api/design-patterns/{id}"
  },
  "fields": [
    "category",
    "description",
    "id",
    "name"
  ],
  "results": [
    {
      "id": "abstract-factory",
      "name": "Abstract Factory",
      "category": "Creational",
      "description": "Provides an interface for creating families of related objects without specifying their concrete classes.",
      "url": "https://gratisapi.com/api/design-patterns/abstract-factory"
    },
    {
      "id": "builder",
      "name": "Builder",
      "category": "Creational",
      "description": "Separates the construction of a complex object from its representation so the same process can create different representations.",
      "url": "https://gratisapi.com/api/design-patterns/builder"
    },
    {
      "id": "factory-method",
      "name": "Factory Method",
      "category": "Creational",
      "description": "Defines an interface for creating an object but lets subclasses decide which class to instantiate.",
      "url": "https://gratisapi.com/api/design-patterns/factory-method"
    },
    {
      "id": "prototype",
      "name": "Prototype",
      "category": "Creational",
      "description": "Creates new objects by copying an existing prototypical instance rather than instantiating from scratch.",
      "url": "https://gratisapi.com/api/design-patterns/prototype"
    },
    {
      "id": "singleton",
      "name": "Singleton",
      "category": "Creational",
      "description": "Ensures a class has only one instance and provides a global point of access to it.",
      "url": "https://gratisapi.com/api/design-patterns/singleton"
    },
    {
      "id": "adapter",
      "name": "Adapter",
      "category": "Structural",
      "description": "Converts the interface of a class into another interface clients expect, letting incompatible classes work together.",
      "url": "https://gratisapi.com/api/design-patterns/adapter"
    },
    {
      "id": "bridge",
      "name": "Bridge",
      "category": "Structural",
      "description": "Decouples an abstraction from its implementation so the two can vary independently.",
      "url": "https://gratisapi.com/api/design-patterns/bridge"
    },
    {
      "id": "composite",
      "name": "Composite",
      "category": "Structural",
      "description": "Composes objects into tree structures to represent part-whole hierarchies, treating individual and composite objects uniformly.",
      "url": "https://gratisapi.com/api/design-patterns/composite"
    },
    {
      "id": "decorator",
      "name": "Decorator",
      "category": "Structural",
      "description": "Attaches additional responsibilities to an object dynamically, providing a flexible alternative to subclassing.",
      "url": "https://gratisapi.com/api/design-patterns/decorator"
    },
    {
      "id": "facade",
      "name": "Facade",
      "category": "Structural",
      "description": "Provides a unified, simplified interface to a set of interfaces in a subsystem.",
      "url": "https://gratisapi.com/api/design-patterns/facade"
    },
    {
      "id": "flyweight",
      "name": "Flyweight",
      "category": "Structural",
      "description": "Uses sharing to support large numbers of fine-grained objects efficiently by keeping common state extrinsic.",
      "url": "https://gratisapi.com/api/design-patterns/flyweight"
    },
    {
      "id": "proxy",
      "name": "Proxy",
      "category": "Structural",
      "description": "Provides a surrogate or placeholder for another object to control access to it.",
      "url": "https://gratisapi.com/api/design-patterns/proxy"
    },
    {
      "id": "chain-of-responsibility",
      "name": "Chain of Responsibility",
      "category": "Behavioral",
      "description": "Passes a request along a chain of handlers until one of them handles it, decoupling sender from receiver.",
      "url": "https://gratisapi.com/api/design-patterns/chain-of-responsibility"
    },
    {
      "id": "command",
      "name": "Command",
      "category": "Behavioral",
      "description": "Encapsulates a request as an object, allowing parameterization, queuing, logging, and undoable operations.",
      "url": "https://gratisapi.com/api/design-patterns/command"
    },
    {
      "id": "interpreter",
      "name": "Interpreter",
      "category": "Behavioral",
      "description": "Defines a grammar for a language and an interpreter that uses the representation to interpret sentences in it.",
      "url": "https://gratisapi.com/api/design-patterns/interpreter"
    },
    {
      "id": "iterator",
      "name": "Iterator",
      "category": "Behavioral",
      "description": "Provides a way to access elements of a collection sequentially without exposing its underlying representation.",
      "url": "https://gratisapi.com/api/design-patterns/iterator"
    },
    {
      "id": "mediator",
      "name": "Mediator",
      "category": "Behavioral",
      "description": "Defines an object that encapsulates how a set of objects interact, promoting loose coupling.",
      "url": "https://gratisapi.com/api/design-patterns/mediator"
    },
    {
      "id": "memento",
      "name": "Memento",
      "category": "Behavioral",
      "description": "Captures and externalizes an object's internal state so it can be restored later without violating encapsulation.",
      "url": "https://gratisapi.com/api/design-patterns/memento"
    },
    {
      "id": "observer",
      "name": "Observer",
      "category": "Behavioral",
      "description": "Defines a one-to-many dependency so that when one object changes state, all its dependents are notified automatically.",
      "url": "https://gratisapi.com/api/design-patterns/observer"
    },
    {
      "id": "state",
      "name": "State",
      "category": "Behavioral",
      "description": "Allows an object to alter its behavior when its internal state changes, appearing to change its class.",
      "url": "https://gratisapi.com/api/design-patterns/state"
    },
    {
      "id": "strategy",
      "name": "Strategy",
      "category": "Behavioral",
      "description": "Defines a family of interchangeable algorithms and encapsulates each so they can vary independently of clients.",
      "url": "https://gratisapi.com/api/design-patterns/strategy"
    },
    {
      "id": "template-method",
      "name": "Template Method",
      "category": "Behavioral",
      "description": "Defines the skeleton of an algorithm in a method, deferring some steps to subclasses.",
      "url": "https://gratisapi.com/api/design-patterns/template-method"
    },
    {
      "id": "visitor",
      "name": "Visitor",
      "category": "Behavioral",
      "description": "Represents an operation to be performed on the elements of an object structure without changing their classes.",
      "url": "https://gratisapi.com/api/design-patterns/visitor"
    }
  ]
}
