Skip to content

maximkrouk/swift-udf-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UDF Tutorial

Step-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.

For now it's just a playground, but the format may change as the complexity grows.

Spoiler: The final result will be close to the composable architecture

API

You can find step-by-step usage example at the UDF.playground root

Implementation

You can find implementation of each step under the Sources/<step_number>.<step_name>.swift file in the playground. Each step has it's namespace, declared with an enum without cases (enum <step_name> {}) 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).

Currently implemented steps

How to use the tutorial?

Open 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)