{"id":19392071,"url":"https://github.com/davidraab/functionalpatterns","last_synced_at":"2025-07-08T19:03:11.117Z","repository":{"id":41823171,"uuid":"510381291","full_name":"DavidRaab/FunctionalPatterns","owner":"DavidRaab","description":"OO Design Patterns in F#","archived":false,"fork":false,"pushed_at":"2022-07-05T14:38:30.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-07T10:11:39.568Z","etag":null,"topics":["design-patterns","fsharp","functional-programming","oop"],"latest_commit_sha":null,"homepage":"","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavidRaab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-04T13:59:25.000Z","updated_at":"2024-11-24T17:25:53.000Z","dependencies_parsed_at":"2022-09-15T16:42:05.368Z","dependency_job_id":null,"html_url":"https://github.com/DavidRaab/FunctionalPatterns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidRaab%2FFunctionalPatterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidRaab%2FFunctionalPatterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidRaab%2FFunctionalPatterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidRaab%2FFunctionalPatterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidRaab","download_url":"https://codeload.github.com/DavidRaab/FunctionalPatterns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240557486,"owners_count":19820360,"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":["design-patterns","fsharp","functional-programming","oop"],"created_at":"2024-11-10T10:30:20.015Z","updated_at":"2025-02-24T21:12:36.030Z","avatar_url":"https://github.com/DavidRaab.png","language":"F#","readme":"# Overview\n\nThis project shows different OO Design Patterns and how I solve them\nin F#\n\n## Builder\n\nInstead of directly creating functions with a string output i use a data-structure.\nUsing a data-structure has many advantages. For example you need only one\nfunction to create proper HTML code with escaping and user rules. Instead of\nre-doing this, again and again.\n\nYou also can create structures that can be easily re-used.\n\n## Decorator\n\n* Decorator1.fsx  - Example from Video - I would change nothing\n* Decorator2.java - A \"good\" Java Example of Decorators\n* Decorator2A.fsx - Solution with DU and plain functions\n* Decorator2B.fsx - Solution with a common Record\n\n## Factory\n\n* Factory1.fsx - PHP CarFactory example re-written in F#\n* Factory2.fsx - Wikipedia IPerson example re-writte in F#\n* Factory3.fsx - My own Example showing Partial Application\n* Factory4.fsx - A Java Example with Shapes converted to F#\n\n## Interpreter\n\n* Interpreter1.fsx - A simple Calculator\n\n## Strategy\n\n* Strategy1.cs   - C# Example from Wikipedia\n* Strategy1A.fsx - A more direct conversation of the C# version\n* Strategy2B.fsx - An extended version that creates a data-structure\n\n## Further Resources\n\nI started this project by watching a video, but then it turned into something different.\nHere are various resources I used to create this project.\n\n* Functional Patterns: https://youtu.be/XiG-uuNKzF8\n* Decorato2.java: https://www.philipphauer.de/study/se/design-pattern/decorator.php\n* Factory1.fsx: https://www.ionos.de/digitalguide/websites/web-entwicklung/was-ist-das-factory-pattern/\n* Factory2.fsx: https://en.wikipedia.org/wiki/Factory_method_pattern#C#\n* Factory4.fsx: https://www.tutorialspoint.com/design_pattern/factory_pattern.htm\n* Strategy1.fsx: https://en.wikipedia.org/wiki/Strategy_pattern#C#\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidraab%2Ffunctionalpatterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidraab%2Ffunctionalpatterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidraab%2Ffunctionalpatterns/lists"}