We are very excited to share with you the launch of our new series Professional iOS Engineering Season 1 — Building a Swift App with TDD and Modular Design, on the Essential Developer's Youtube channel.
During the series Caio and Mike pair program and demonstrate the discipline of test driven development, the power of modular systems, and how to welcome future requirements. They maintain a sustainable development cycle and continuously reflect on how to become more effective while paying attention to technical excellence and good design.
The series were created for professionals and aspiring iOS developers who want to take their skillset to the next level. Caio and Mike try to reason and explain most decisions they make and they strive to provide multiple solutions to problems.
Watch now the first two episodes:
S01E01: Swift App Idea and Prototyping with Storyboards
In the first episode of the series, we discuss the idea of building a Quiz app for iOS.
We kick off the season by discussing some of the features of the app such as question and answer formats and possible multiplayer options.
We then jump to the creation of a prototype, which allows us to have a point of reference and eliminate any assumptions as we move forward and finally reflect if investing 15 minutes for creating it was worth it in the first place.
Spoiler alert! Of course, it was!
S01E02: [TDD 🍅 1] Creating a Swift Framework - The Game Engine
In this episode, we dive into our first lines of code. Before we begin building the project, we agree on a set of rules such as:
- Follow the Pomodoro Technique for segmenting workload and time
- Develop the system by writing tests first
- Separate the responsibilities of the system in modules
We start by creating the QuizEngine project, a module responsible for the business logic of the system. Despite the fact that we are building an iOS app, the QuizEngine is created as a macOS framework, allowing us to embed it later in any platform specific deployment target (iOS, tvOS, watchOS, macOS). We also get for free blazing fast unit tests 🚀!
Our first component is the Flow, a class responsible for controlling the routing of the system based on a simple question, "Are there any more questions to show?".
- In case there are we want to get the answer for the current question and move on to the next one.
- If there are no more questions we want to route to the results.
As we test drive the Flow we get into how we choose to create classes over structs, abstract behaviours by using protocols, boost your productivity by using a somewhat obscure feature of Xcode and much more!