Implement a Service-Oriented Architecture in Swift 5

Make sure your App Delegate can take care of it too!

Steven Curtis
3 min readJul 12, 2021


Photo by Lefteris kallergis on Unsplash

A Service Oriented Architecture (SOA) is an architecture pattern that consolidates functionality and business logic in such a way that services can be injected into view controllers for use.

This type of architecture can leverage dependency injection as a means to achieve a clear separation of concerns.


You will be expected to be aware how to make a Single View Application, or a Playground to run Swift code

This article avoids Dependency Injection, but you should be aware of what that is, and make up your own mind whether that is relevant for your application.


AppDelegate: Effectively the root object of an iOS App, working in conjunction with UIApplication to manage interactions with the system.


I’ve put together a repo with the code in this article, as well as a video where I talk about the concepts discussed here. I hope this helps you!

The basics:

This diagram shows three possible services, one for crash reporting, one for analytics and one for persisance and of course the classic one for networking

The Basic Implementation

App Delegate

Within the App Delegate we can set up the services:

The AnalyticsService

The CrashReporterService