• Stars
    star
    412
  • Rank 105,024 (Top 3 %)
  • Language
    Swift
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Elm Architecture in Swift

The Elm Architecture in Swift

This project is a port of The Elm Architecture to Swift.

This is sample code, and not at all production-ready. It's a proof-of-concept, it seems to work well and I don't think there are major roadblocks (except adding all of UIKit to the virtual views layer).

Open the workspace, and look at the playgrounds. It shows some examples. (Even though the playgrounds currently don't seem to run).

Then go to AppDelegate, and run one of the three apps (uncomment the right lines to run one of them).

This is part of an upcoming project I'm working on, and I am planning to write up documentation for usage and implementation (at some point).

There are three sample apps:

For more Elm-like frameworks in Swift, see Yasuhiro Inami's excellent list.

Enjoy!


Notes:

  • If you come from a functional language such as Elm or Haskell, you might be put off by the fact that send is marked as mutating. Don't be fooled: it behaves very similar to Elm/Haskell. You still have value semantics, and you can still have a time-traveling debugger. See structs and mutation or undo history for some more info on that.

More Repositories

1

TerminalUI

Swift
321
star
2

github-issues

Swift
196
star
3

pomotv

HTML
183
star
4

OLD-functional-view-controllers

More Experiments in Functional View Controllers
Swift
134
star
5

commonmark-swift

Swift
123
star
6

LiterateSwiftGUI

Swift
123
star
7

swift-reading-club

Swift
91
star
8

incremental-simplified

Swift
69
star
9

literate-swift-old

Literate Swift
Swift
42
star
10

NSIncrementalStore-Test-Project

Objective-C
38
star
11

shoes-swift

Swift
35
star
12

intentions

Intentions Test Project
Objective-C
35
star
13

laufpark-stechlin

App for Laufpark Stechlin
Swift
33
star
14

reducers-examples

Swift
29
star
15

incremental-swift

Swift
29
star
16

formlets

Haskell Formlets
Haskell
24
star
17

uikonf2020

Swift
24
star
18

literate-swift

Swift
20
star
19

ElasticTabStops

Swift
19
star
20

CEPopupPickerView

A UIPickerView that pops up, just like the facebook app.
Objective-C
17
star
21

URLCodable

Swift
16
star
22

PostGPS

Post your GPS location to a web hook on significant location changes
Swift
16
star
23

iosmeetups

A list of iOS meetups around the world.
14
star
24

animations

Swift
14
star
25

SwiftHighlighting

Swift Syntax Highlighting
Swift
11
star
26

core-image-video

Swift
10
star
27

tagless-graphics

Swift
10
star
28

parsing-helpers

Swift
10
star
29

ometa-objc

OMeta/ObjC implementation
Objective-C
9
star
30

speaking

Speaking
9
star
31

LinkedInAPI

Cocoa interface to the LinkedInAPI
Objective-C
9
star
32

forms-example

Swift
8
star
33

HtmlToMarkdown

Quick and dirty HTML to Markdown converter
Swift
8
star
34

pretty

Pretty printers in Swift
Swift
7
star
35

chris.eidhof.nl

my blog
HTML
7
star
36

runloop

iOS and Mac devs running with laptops
6
star
37

defunctionalization-examples

Swift
6
star
38

swiftui-video-recording

Swift
5
star
39

happstack-fastcgi

A link between Happstack and FastCGI
Haskell
5
star
40

fp-workshop-q42

Swift
5
star
41

datalog-talk

Datalog Talk
JavaScript
5
star
42

adaptive-swift

Swift
5
star
43

functional-swift-conf-2015

Functional Swift Conf 2015 website
Ruby
5
star
44

applicative-extras

Extra instances for Applicative Functors
Haskell
5
star
45

pragma-sample-code

Swift
5
star
46

LispInObjectiveC

Objective-C
4
star
47

generics

A generic programming library for the web, inspired by EMGM
Haskell
4
star
48

libuv-test

Swift
4
star
49

chriseidhofnl

My Website
Swift
4
star
50

iPhone-examples

Some examples for iPhone programming
Objective-C
4
star
51

regular-web

Generic programming for the web.
Haskell
4
star
52

parsingwithblocks

Experiment in using chainable blocks for parsing in objc.
Objective-C
4
star
53

apa

Apa Exercises
Haskell
3
star
54

thesis

Thesis project
Haskell
3
star
55

register

Swift
3
star
56

middleman-starter-netlify-cms

CSS
3
star
57

playgrounds-to-markdown

Swift
3
star
58

functional-view-controllers-old

Experiments in Functional View Controllers
Swift
3
star
59

ChrisLib

Yet another project with utility stuff
C
3
star
60

persist

A persistence library for Haskell
Haskell
3
star
61

the-real-plazes

The Real Plazes
3
star
62

research-incremental

3
star
63

notes-clone

SwiftUI Notes Clone
2
star
64

pdf-optimizer

Swift
2
star
65

coredata-tests

Some Tests against Core Data: CD in the background, and KVO of nested properties
Objective-C
2
star
66

table-tennis

Swift
2
star
67

fp-workshop-apegroup

FP Workshop at Apegroup
Swift
2
star
68

tcp-json-swift

Swift
2
star
69

fp-workshop-codepot

Swift
2
star
70

CwlFitting

A small SwiftUI package to aid with "shrink-to-fit" + "fill-aligned" VStack and HStack arrangements.
Swift
2
star
71

Basil

basil
Haskell
2
star
72

alttechtalksberlin

Alt Tech Talks Berlin
2
star
73

slides

A haskell presentation DSL
Haskell
2
star
74

accessibility-inspector

Swift
1
star
75

fun

Experiment: a strongly typed, garbage collected, strict functional language that interacts with Objective-C
Haskell
1
star
76

quickcheck-in-swift-blogpost

1
star
77

minilog

Swift
1
star
78

workshop-api

Swift
1
star
79

goldenorb-test

A test project for GoldenOrb
Java
1
star
80

flow-layout

Flow Layout Example
Swift
1
star
81

mdevcamp-2019-cairo

Swift
1
star
82

interface-builder-test

Interface Builder example project
Objective-C
1
star
83

TimeCalc

A calculator for running times
Haskell
1
star
84

ObjcioHelpers

Helper methods we keep using
Swift
1
star
85

swift-sums-of-products

Swift
1
star
86

hextouicolor

Small commandline tool to convert hex strings from designers into UIColor definitions
Objective-C
1
star
87

formlets-massinput

Formlets with mass input editing capabilities
1
star
88

fp-workshop-bobkonf

BobKonf FP Workshop
Swift
1
star
89

swift-syntax

Wrapper around the swift syntax highlighter to create highlight.js compatible output
Swift
1
star
90

backend-experiments

Swift
1
star
91

Ccmark

Swift
1
star
92

presentation-lenses

My presentation about Lenses
Haskell
1
star
93

macros-mini

Swift
1
star
94

objc-generation

Some experiments with code generation for ObjC (in Haskell)
Haskell
1
star
95

ometa-objc-presentation

Presentation about OMeta/ObjC
JavaScript
1
star