Medium iOS应用架构的演变

A follow-up to my previous article

对我之前的文章的跟进

Last June, we started to transition from a monolithic architecture to a package-based one.

去年6月,我们开始从单体架构过渡到基于包的架构。

You can read the previous article above to get familiar with what we were trying to do and where we wanted to go. The goal of this new article is mainly to give an update on the status of our iOS journey and project, and how this new architecture has been going on.

您可以阅读上面的先前文章,以了解我们试图做什么以及我们想要去哪里。这篇新文章的目标主要是更新我们的iOS之旅和项目的状态,以及这个新架构的进展情况。

Also, I feel like writing this before the WWDC 2022 is the right thing to do!

此外,我觉得在 WWDC 2022 之前写这篇文章是正确的事情!

First, it’s been a huge success! Our codebase is definitely more organised, we can iterate, build & debug faster, all thanks to both Swift package and SwiftUI!

首先,这是一个巨大的成功!我们的代码库明显更有组织性,我们可以更快地迭代、构建和调试,这都归功于Swift package和SwiftUI!

Before beginning, I want to state that this is still in progress, at the moment, only a small part of the app is properly decoupled into independent packages. We’re actively cleaning up and rewriting huge parts of the app, but this is not a purely engineering effort. We’re also using this as an opportunity to rebuild features, incorporating a lot of products & design improvements, alongside bug fixes.

在开始之前,我想声明这仍然在进行中,目前只有一小部分应用程序已经正确解耦为独立的包。我们正在积极清理和重写应用程序的大部分内容,但这不仅仅是一个纯粹的工程努力。我们还利用这个机会重建功能,结合了许多产品和设计改进以及错误修复。

Also, this is a team effort involving my teammates Zouhair Mahieddine and Alla Dubovska as well as yours truly, but also past iOS team members who helped build the foundations of our new architecture.

此外,这是一个团队合作,涉及到我的队友Zouhair MahieddineAlla Dubovska,以及我本人,还有过去帮助构建我们新架构基础的iOS团队成员。

Swift Packages

Swift Packages

We split our codebase into two proper Swift packages, Model and Features. And then Model and Features define several different library products. Those are not just folders / groups.

我们将代码库分成了两个适当的 Swift 包,ModelFeatures。然后 ModelFeatures 定义了几个不同的库产品。这些不仅仅是文件夹/组。

Here an extract of the Model package.swift

这是Model package.swift的摘录

And here is the same for Features

这里是关于F...

开通本站会员,查看完整译文。

trang chủ - Wiki
Copyright © 2011-2024 iteam. Current version is 2.137.3. UTC+08:00, 2024-11-28 17:46
浙ICP备14020137号-1 $bản đồ khách truy cập$