{"id":22688219,"url":"https://github.com/emanuelefavero/design-patterns","last_synced_at":"2025-03-29T16:13:20.961Z","repository":{"id":191705265,"uuid":"673444940","full_name":"emanuelefavero/design-patterns","owner":"emanuelefavero","description":"This is a cheat sheet repo for software design patterns","archived":false,"fork":false,"pushed_at":"2023-08-30T19:48:20.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-04T16:50:27.659Z","etag":null,"topics":["algorithms","design-patterns","javascript","object-oriented-programming","oop"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emanuelefavero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-01T16:29:37.000Z","updated_at":"2023-08-01T16:30:47.000Z","dependencies_parsed_at":"2023-08-31T09:07:46.646Z","dependency_job_id":null,"html_url":"https://github.com/emanuelefavero/design-patterns","commit_stats":null,"previous_names":["emanuelefavero/design-patterns"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emanuelefavero%2Fdesign-patterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emanuelefavero%2Fdesign-patterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emanuelefavero%2Fdesign-patterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emanuelefavero%2Fdesign-patterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emanuelefavero","download_url":"https://codeload.github.com/emanuelefavero/design-patterns/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246207509,"owners_count":20740723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","design-patterns","javascript","object-oriented-programming","oop"],"created_at":"2024-12-10T00:13:32.614Z","updated_at":"2025-03-29T16:13:20.923Z","avatar_url":"https://github.com/emanuelefavero.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Design Patterns\n\nDesign patterns are general reusable solutions to common software design problems. They help you write code that is more maintainable, flexible, reusable and scalable\n\n## Types of Design Patterns\n\nDesign patterns are typically divided into three categories:\n\n### 1. **Creational Patterns**\n\nCreational patterns focus on object creation mechanisms, providing ways to instantiate objects in a flexible manner. _Some commonly used creational patterns are:_\n\n- **Singleton**: Ensures a class has only one instance and provides a global point of access to that instance\n- **Factory Method**: Defines an interface for creating objects, but allows subclasses to decide which class to instantiate\n- **Builder**: Separates the construction of a complex object from its representation, allowing the same construction process to create different representations\n\n### 2. **Structural Patterns**\n\nStructural patterns focus on object composition and typically identify simple ways to realize relationships between different objects. _Some commonly used structural patterns are:_\n\n- **Adapter**: Allows the interface of an existing class to be used as another interface. It is often used to make existing classes work with others without modifying their source code\n- **Decorator**: Allows behavior to be added to an object statically or dynamically, without affecting the behavior of other objects from the same class\n- **Facade**: Provides a simplified interface to a complex subsystem, making it easier to use\n\n### 3. **Behavioral Patterns**\n\nBehavioral patterns focus on communication between objects and the distribution of responsibilities. _Some commonly used behavioral patterns are:_\n\n- **Observer**: Defines a one-to-many dependency between objects, so that when one object changes state, all its dependents are notified and updated automatically\n- **Strategy**: Defines a family of interchangeable algorithms, allowing the algorithm to be selected at runtime\n- **Template Method**: Defines the structure of an algorithm but lets subclasses override specific steps\n- **Null Object**: Provides an object as a surrogate for the lack of an object of a given type\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femanuelefavero%2Fdesign-patterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femanuelefavero%2Fdesign-patterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femanuelefavero%2Fdesign-patterns/lists"}