Skip to content

iOS Client + Kotlin Server App illustrating various TDD approaches for common functionality.

License

Notifications You must be signed in to change notification settings

theextremeprogrammer/ToDoList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To Do List iOS Client App + Kotlin Spring Server

Build Status

The world clearly doesn't need another to-do list app - however I wanted to build a simple iOS app to illustrate how I have been approaching test-driving iOS development lately.

The purpose of this app is to showcase how to test-drive out various typical aspects of an iOS app client with a Kotlin Spring back-end.

I typically don't write many, of any, comments in code these days. However I broke this rule for this project specifically so readers could understand some of the "why?" behind these approaches.

This code is the result of several years of TDD'ing iOS apps, reading books on testing and engineering topics, and input and influence from a number of people who have taught me so many things.

iOS Client Functionality

Ideally my goal is to illustrate at least the following features and functionality, completely test-driven:

Project Organization / Automation / Discoverability

  • How to arrange your folders and files using an "Application", "Components", and "UI" structure to provide separation of concerns. Inspired by the App Continuum.
  • How to sort your Xcode project file to minimize merge conflicts within the team.
  • How to use a Makefile to automate repetitive tasks and increase discoverability.
  • CI integration with Travis.
    • iOS Client Unit Test Job
    • Kotlin Unit Test Job
    • Kotlin Integration Test Job
  • How to automate bumping the build # for your app.
  • How to manage different release types (local development, beta, release, etc).

Testing

  • How to execute your tests without launching the application's AppDelegate class.
  • How to test-drive your app delegate and use dependency injection (DI) from the moment the app starts.
  • How to roll your own test-doubles using protocol-oriented programming as well as examples of each kind of test double.
    • Dummy
    • Spy
    • Stub
    • Mock
    • Fake
  • How to implement the Repository pattern using an asynchronous Http call using promises/futures.
  • How to deserialize JSON data into a model object using the Codable protocol.

Networking

  • How to make HTTP requests without importing a networking framework.
    • GET request
    • POST request
    • PUT request
    • DELETE request
  • Examples of how to handle errors from HTTP requests

Navigation

  • Displaying a modal view controller.
  • Dismissing a modal view controller.
  • Using the Router pattern to push a new view controller onto the stack. (Tap cell to navigate to detail VC.)
  • Popping a view controller off of the stack.

UI

  • How to make an Http call to retrieve data from a repository.
  • How to test-drive reloading a UITableView or UICollectionView.
  • How to use PureLayout to lay out the view hierarchy without using Storyboards.
  • Discoverable & configurable i18n
    • Localize strings in English, Japanese, Korean
  • How to access images using an enum for compile-time safety when working with images.
  • How to style UI components using pre-defined enum styles.
  • How to configure a scrollview for a View Controller using PureLayout.
  • Discoverable & configurable a11y

Kotlin Spring Server Functionality

REST API Endpoints

  • Using unit-tests to test-drive controller endpoints.
    • GET Endpoint - List of ToDoItems
    • POST Endpoint - Create a new ToDoItem
    • PUT Endpoint - Update an existing ToDoItem
    • DELETE Endpoint - Delete an existing ToDoItem

Testing

  • How to break out your integration tests from your unit tests so they can be run separately.

Repository

  • How to implement the Repository pattern for an in-memory store.
    • Get list of ToDoItems
    • Create a new ToDoItem
    • Update an existing ToDoItem
    • Delete an existing ToDoItem

License

ToDoList is licensed under the MIT License. Please see the LICENSE file.

About

iOS Client + Kotlin Server App illustrating various TDD approaches for common functionality.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published