{"id":19646970,"url":"https://github.com/khaledsawan/design-patterns","last_synced_at":"2025-10-11T02:18:51.008Z","repository":{"id":193148343,"uuid":"688218459","full_name":"khaledsawan/design-patterns","owner":"khaledsawan","description":"The Singleton, Factory Method, Adapter, Composite, and Observer design patterns are all demonstrated together.","archived":false,"fork":false,"pushed_at":"2023-09-06T22:54:18.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T00:18:02.433Z","etag":null,"topics":["adapter-pattern","composite-pattern","design-patterns","factory-method-pattern","java","observer-pattern","singleton-pattern"],"latest_commit_sha":null,"homepage":"","language":"Java","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/khaledsawan.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-06T22:46:51.000Z","updated_at":"2023-10-02T21:54:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"469e7945-c3e1-433f-b68d-77c1a6e33339","html_url":"https://github.com/khaledsawan/design-patterns","commit_stats":null,"previous_names":["khaledsawan/design-patterns"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/khaledsawan/design-patterns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledsawan%2Fdesign-patterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledsawan%2Fdesign-patterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledsawan%2Fdesign-patterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledsawan%2Fdesign-patterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khaledsawan","download_url":"https://codeload.github.com/khaledsawan/design-patterns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledsawan%2Fdesign-patterns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005928,"owners_count":26083998,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["adapter-pattern","composite-pattern","design-patterns","factory-method-pattern","java","observer-pattern","singleton-pattern"],"created_at":"2024-11-11T14:41:42.984Z","updated_at":"2025-10-11T02:18:50.941Z","avatar_url":"https://github.com/khaledsawan.png","language":"Java","readme":"# design-patterns\n## The Singleton, Factory Method, Adapter, Composite, and Observer design patterns are all demonstrated together.\n\n- **Singleton** ensures that there is only one instance of the Singleton class.\n\n- **Factory Method** is used to create objects based on a common interface.\n\n- **Adapter** allows the `AdapterLegacySystem` to adapt the legacy system's interface to the Product interface.\n\n- **Composite** represents a part-whole hierarchy with Component, Leaf, and Composite classes.\n\n- **Observer** defines a one-to-many relationship between the Subject and multiple Observer objects.\n\nThis example showcases the integration of these design patterns into a single application, illustrating how they can work together in a cohesive manner.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhaledsawan%2Fdesign-patterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhaledsawan%2Fdesign-patterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhaledsawan%2Fdesign-patterns/lists"}