Chapter 11. Case Study – Developing an iOS Application with the FP and OOP Paradigms

In the previous chapters, we covered a variety of concepts and techniques. We started with FP paradigms and explored related topics in detail. Also, in the previous chapter, we covered other paradigms such as OOP, FRP, and POP, and mixing them together. In this chapter, we will create a simple application using those paradigms.

Most of iOS applications need a backend to be able to provide advanced functionalities such as integration with other systems. In this chapter, we will create a simple backend with Swift that is going to be used as a Todo application rest API. Then, we will develop an iOS application that will leverage our backend and provide some essential functionality such as listing and updating Todo items coming from the backend. Also, iOS application will be able to create new Todo items. Our iOS application development will include FP, OOP, POP, and FRP paradigms.

This chapter will cover the following topics:

  • Requirement specifications
  • High-level design
  • Backend development
    • Environment configuration
    • Swift Package Manager
    • Vapor
    • Application development
  • Frontend development
    • CocoaPods dependency management configuration
    • Third-party libraries
    • Backend communication
    • JSON parsing and model mapping
    • State management
    • Listing items with a UITableView
    • Updating and creating items
    • Filtering items

Requirements

This section presents the requirements for our case study. Since the focus of this book is not requirement engineering, we will define very simple requirements. This section does not present best practices for requirements engineering.

The requirements for the iOS application user are as follows:

  • Users should be able to list Todo items
  • Users should be able to see the details of each item
  • Users should be able to modify items
  • Users should be able to create a new item
  • Users should be able to filter items by their status
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset