Join Newsletter

Implementing the Elm Architecture for iOS in Swift

YOW! Lambda Jam 2018

Elm, for a long time the flag bearer of Functional Reactive Programming on the web, recently switched to a simpler pure functional architecture, citing 'ease of use'. Those of us that have worked on complex reactive mobile apps can sympathise with this - using FRP injudiciously in your app can make the code difficult to understand and near impossible for new developers to pick up.

So are we able to apply some of the techniques and patterns from Elm into iOS apps? It turns out the Elm architecture is a really great fit for Swift & iOS - it allows us to:

  • reserve our FRP hammer for the use cases that make the most sense
  • separate out a simple, consistent, and highly testable pure functional core, and
  • provide a flexible, yet easily understood & applied set of architectural building blocks.

This session will cover the basics of implementing and using an Elm-style architecture in a Swift app, will include lessons learnt in a real-world implementation, pitfalls/benefits, and implementation considerations should you adopt the approach in your own app.