O'Reilly logo

Swift Functional Programming - Second Edition by Dr. Fatih Nayebi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we developed a backend with the Swift Vapor library, which handles the Todo items POST, GET, and DELETE. Then, we developed a frontend iOS application that leverages functional programming, reactive programming, and State management techniques declaratively. We started by developing our Todo model in a functional style, and then we developed a Store object and its extensions to handle State storage, and Action to handle State changes. We defined and used Lens to modify our properties and a WebServiceManager with reflection techniques to request for backend resources.

In this case study, we were able to use value types such as struct and enum and avoid classes. In fact, the only four classes in this case study are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required