Lickability/swift-best-practices
关于
一个包含 Lickability 最佳实践相关信息的仓库。
学习与教育实测星标增长
- 24小时
- 0
- 7天
- -1
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Lickability Swift Best Practices Guide
Code is written for humans. I’m not the first to say that, and won’t be the last. What you write will eventually be compiled away into something unintelligible, so how you choose to write code isn’t for the computer’s benefit. It’s for yourself, both now and later. It’s for any people working on a team with you. And it’s for anyone that stumbles upon your code after you’re gone.
In order to understand our code better, Lickability employs consistent practices—and to do that, we have a defined structure and style for the way we write code. This style guide is intended to be a living repository that will be updated as the Swift language and our experience evolves. You can click through the links below to read individual sections, or you can read the full document here.
If you want to use this, great! If you want to fork it and make changes, go ahead. We won't be accepting issues or pull requests at this time, but we hope that you'll find it our approach to writing software interesting-and if there are aspects that you'd love to chat about, let us know!
Architecture Info
When developing new applications, we typically follow the architecture outlined by The Composable Architecture. When that is not possible for technical or business reasons, the below architecture is followed.
Architecture Development Diagram
- M - Model
- V - View
- C - Controller
- VM - View Model
SwiftUI
Related Resources
Organizational Info
Technical Info
- Custom Operators
- Default Parameters
- Localization
- Naming
- Interface Builder
- Object Communication
- Optionals
- Protocols
- Testing
- Zero Usage
Style
We use SwiftLint for code linting. We avoid making style comments on pull requests wherever possible, instead allowing the linter to catch them while developing. The fully documented .yml file we use is located here.
SwiftUI / Combine
The majority of this document was written prior to the introduction of SwiftUI and Combine. As we become more familiar with these technologies and use them in our own projects, we expect them to reshape the best practices as it exists today.
探索相关项目
加载中…