https://github.com/crisfeim/apply-bruno-roscha-modularization-article
👨🏫 Applying the principles exposed on the modularizaton article by Bruno Rocha
https://github.com/crisfeim/apply-bruno-roscha-modularization-article
modular-architecture modularization study xcframeworks
Last synced: 8 months ago
JSON representation
👨🏫 Applying the principles exposed on the modularizaton article by Bruno Rocha
- Host: GitHub
- URL: https://github.com/crisfeim/apply-bruno-roscha-modularization-article
- Owner: crisfeim
- Created: 2025-05-09T10:41:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-26T10:37:08.000Z (about 1 year ago)
- Last Synced: 2025-06-02T06:08:22.707Z (about 1 year ago)
- Topics: modular-architecture, modularization, study, xcframeworks
- Language: Swift
- Homepage: https://www.runway.team/blog/how-to-improve-ios-build-times-with-modularization
- Size: 259 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Practice project for integrating and learning the principles exposed on the [modularization article by Bruno Rocha](https://www.runway.team/blog/how-to-improve-ios-build-times-with-modularization)
The second commit contains the implementation of the dependency graph showcased at the beginning of the article:

As described by the article, this scales badly as on each change of the HTTPClient, a recompile is needed for all the modules that use it.
Instead:
- We made those modules depend on a protocol
- We create a separate module for the concrete implementation
- The main module imports everything, assembles the modules and injects the concrete implementation.
A protocol isn't likely to change much during our dev (susceptible to change mostly at the beginning but rarely later)
If the HTTPClient implementation module changes, any module that depends on the HTTPClientProtocol will not be recompiled, thus, keeping compiling times fast.
The dependencies become horizontal, here's an updated dependency diagram:

Third commit partially implements this (for simplicity I only HTTPClient a protocol)