Sample iOS app using TDD + DDD + Clean architecture
mssample-ios is an iOS app showcase built using TDD and DDD.
I’m not going to introduce anything new to the community but just put together all the pieces of the puzzle and apply the concept to an iOS application.
You mush open MSSampleiOS.xcworkspace—which includes all the modules.
It’s the main project of the app and contains the skeleton of our iOS app which orchestrates all the modules.
The module Core
provides the main functionalities of the app which must be used by all the vertical modules.
We have also a CoreMock
to contain the test doubles classes of Core
.
The module Album
is a vertical module and provides the implementation for the feature photo collection and photo details views. It uses Core
for main functionalities like UIKit
extensions and networking.
Each module should expose a public router to allow the app to orchestrate the routing.
The core of the architecture follows 3-tier architecture to split and decouple the responsibilities.
AlbumDTO
to Album
). If we use DTOs, we no longer have to soil our main entities with parsing logics like Decodable
or 3rd party libraries.UIKit
controller.mssample-ios is released under the MIT license. See LICENSE for details.