{"id":19742503,"url":"https://github.com/maximkrouk/swift-udf-tutorial","last_synced_at":"2025-02-27T23:21:27.545Z","repository":{"id":138563525,"uuid":"401359134","full_name":"maximkrouk/swift-udf-tutorial","owner":"maximkrouk","description":"UDF Tutorial for Swift","archived":false,"fork":false,"pushed_at":"2021-09-02T10:05:26.000Z","size":873,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T20:19:08.815Z","etag":null,"topics":["combine","composable-architecture","fp","functional-programming","playground","swift","swiftui","tutorial","udf"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/maximkrouk.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":"2021-08-30T13:46:31.000Z","updated_at":"2021-09-03T13:26:42.000Z","dependencies_parsed_at":"2023-05-14T07:00:45.161Z","dependency_job_id":null,"html_url":"https://github.com/maximkrouk/swift-udf-tutorial","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/maximkrouk%2Fswift-udf-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximkrouk%2Fswift-udf-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximkrouk%2Fswift-udf-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximkrouk%2Fswift-udf-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maximkrouk","download_url":"https://codeload.github.com/maximkrouk/swift-udf-tutorial/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241072599,"owners_count":19904806,"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":["combine","composable-architecture","fp","functional-programming","playground","swift","swiftui","tutorial","udf"],"created_at":"2024-11-12T01:31:57.937Z","updated_at":"2025-02-27T23:21:27.518Z","avatar_url":"https://github.com/maximkrouk.png","language":"Swift","readme":"# UDF Tutorial\n\nStep-by-step we are creating UDF framework from scratch. We take a very basic implementation, find problems and improve it to build an intuition on how do unidirectional frameworks work under the hood.\n\nFor now it's just a playground, but the format may change as the complexity grows.\n\n\u003e Spoiler: The final result will be close to [the composable architecture](https://github.com/pointfreeco/swift-composable-architecture)\n\n## API\n\nYou can find step-by-step usage example at the UDF.playground root\n\n## Implementation\n\nYou can find implementation of each step under the `Sources/\u003cstep_number\u003e.\u003cstep_name\u003e.swift` file in the playground. Each step has it's namespace, declared with an enum without cases (_`enum \u003cstep_name\u003e {}`_) We will use some external helpers, imported as a source code under the `Sources/Helpers` folder (you don't have to figure out how do these external dependencies work, it is optional, but might be useful).\n\n### Currently implemented steps\n\n- **[1.BasicExample](UDF.playground/Sources/1.BasicExample.swift)**\n- **[2.BetterErgonomics_1](UDF.playground/Sources/2.BetterErgonomics_1.swift)**\n- **[3.BetterErgonomics_2](UDF.playground/Sources/3.BetterErgonomics_1.swift)**\n- **[4.PerformanceImprovements_1](UDF.playground/Sources/4.PerformanceImprovements_1.swift)**\n- **[5.PerformanceImprovements_2]((UDF.playground/Sources/5.PerformanceImprovements_2.swift))**\n- **[6.HigherOrderReducers_1](UDF.playground/Sources/6.HigherOrderReducers_1.swift)** _`Draft`_\n\n## How to use the tutorial?\n\nOpen `UDF.playground` in Xcode. At the root of the playground you can find notes on how to use our UDF framework at each step. Read the tutorial line-by-line. Notice, that at the beginning of each section we encourage you to navigate to implementation and find out how things work and what was changed on each step (read comments line-by-line for some help, Xcode docs may help you to read comments a bit easier)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"Assets/XcodeDocs.png\" width=\"80%\"\u003e\n\u003c/p\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximkrouk%2Fswift-udf-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximkrouk%2Fswift-udf-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximkrouk%2Fswift-udf-tutorial/lists"}