Testing has grown to be a very important part of software development. When I first started my career, I didn’t hear about writing tests until a few years in. Then we started writing tests for all our libraries. When I first got into Cocoa development, testing was not a part of the culture. That slowly changed, and now it is an important part of development on Apple platforms.
In many ways we are still catching up to other development cultures where testing has been much more ingrained in the culture, such as the web development world. Their tools just seem to be more mature, but it is also easier to test something that is based on a stateless protocol like HTTP.
... ➦On June 6th, I flew out to Pittsburgh to see the Pirates play the Dodgers for the final stop in my lifetime goal to see a home game for every MLB team. What’s interesting is that the very first game I ever saw was the Dodgers vs. the Pirates in Los Angeles in 1976. So a fitting end. I didn’t plan it the way, it just happened. It took 48 years of being in the right city at the right time (due to business trips, vacations, etc.), and some extra effort for the last 10 or so, where I had to actually plan trips just to see some teams.
... ➦In comments to my last article on The Composable Architecture readers have asked about examples of how I think an app should be written. In the article, I did mention my previous posts, which have examples for Clean Swift and MVVM, but those were written for UIKit. SwiftUI didn’t exist at the time.
So, this article will talk about what I think is a great example of architecture for a SwiftUI app. Pointfree’s own SyncUps app. The example actually has 2 apps, one showing tree-based navigation, and one showing stack-based navigation. For this article, I will just focus on the stack-based example.
... ➦I recently finished a 3 year stint with a company that uses the Composable Architecture (TCA) from PointFree. I wanted to write about my experiences with TCA and some of the problems I see with it.
I think Brandon Williams and Stephen Cellis, the creators of TCA, are absolutely brilliant, and what they have managed to pull off with the creation of TCA is amazing. However, It’s just the two of them, and nobody, or no thing, is perfect.
... ➦
Busch Stadium
I finally went to another baseball game in my goal to see every MLB team at their home stadium. This time I went to St. Louis to see the Cardinals. I call this my penultimate stadium because just Pittsburgh is left after this one. More on that later.
Here’s the box score:
If you’ve visited this site in the past, you’ve probably noticed a change. I recently changed my blogging platform from WordPress to Hugo. Hugo is static site generator. I also changed my theme.
I was never really satisfied with the performance of my WordPress site. Combine that with the fact that my site kept going down every month, I decided that it was time to do something and be more in control.
... ➦
Believe or not, I just got around to watching the 2 Steve Jobs movies that came out a few years ago: Steve Jobs, starring Michael Fassbender, and Jobs, starring Ashton Kutcher
I’ve held off watching them because I knew there would be a lot of inaccuracies. I grew up with Steve Jobs. I followed him. I didn’t want to see him distorted the way Hollywood does.
... ➦With SwiftUI, everything has changed. As Brent Simmons said, it’s the end of the NeXT era and the beginning of the Swift era.
With the coming of SwiftUI, most of our app architectures are no longer valid (or at least parts of them). They need to be adjusted. MVC is certainly out. In fact, even controllers seem to be out. From Apple’s content, it seems all we have is models and views, and that’s true. Bindings have seemingly replaced controllers.
... ➦I recently found two more examples of Clean Architecture.
The first one is called CosyHome and is an example iOS application for a home heating system developed using Clean Architecture and developed with Acceptance Test Driven Development (ATDD) using Fitnesse. Fitnesse is something I’d like to dive more into and could be a future post. Let me know if you’re interested. You can find CosyHome here.
The other example is CleanNote that applies Clean Architecture to an iOS and Mac application. You can find that one here.
Today, I’d like to take an example iOS app written with an MVC architecture and show you what the example would be with a Clean Swift architecture. The example I’ve chosen to use is the Quiz app from chapter 1 of the 3rd edition of iOS Programming: The Big Nerd Ranch Guide.
The Quiz is a simple app that is like flash cards. It looks like this:
... ➦