The Elm Architecture in Swift
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Samples.playground Small fixes to the playground pages Sep 18, 2017
Todos.xcworkspace Initial commit Jun 21, 2017
Todos Don't try to drag and drop! Jun 21, 2017
README.md Update README.md Jun 21, 2017

README.md

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.