-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d132394
commit 71bf419
Showing
8 changed files
with
143 additions
and
6 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...rviceLoaderPlugin/src/main/resources/META-INF/gradle-plugins/com.yc.spi.loader.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# resources目录会被自动识别为资源文件夹 | ||
# resources目录下新建文件夹META-INF,META-INF文件夹下新建gradle-plugins文件夹 | ||
# plugin的全路径地址,注意该文件的命名就是你之后使用插件的名字 | ||
implementation-class=com.yc.spi.loader.gradle.BuildTimeCostPlugin | ||
implementation-class=com.yc.spi.loader.gradle.ServiceLoaderPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
#### 目录介绍 | ||
- 概述 | ||
- 项目背景 | ||
- 设计目标 | ||
- 方案设计 | ||
- 整体架构 | ||
- 架构设计图 | ||
- UML设计图 | ||
- 功能设计 | ||
- 关键流程图 | ||
- 接口设计图 | ||
- 模块间依赖关系 | ||
- 其他设计(Optional) | ||
- 性能设计 | ||
- 稳定性设计 | ||
- 灰度设计 | ||
- 降级设计 | ||
- 异常设计 | ||
- 排期与计划 | ||
- 排期节点 | ||
- 落实反馈 | ||
|
||
|
||
### 01.概述 | ||
#### 1.1 项目背景 | ||
- 通过简要的语言描述项目背景以及要达成的业务目标。 | ||
|
||
#### 1.2 设计目标 | ||
- 需求的背后往往会带来技术的重构/优化,或者单纯的完成需求,如果有必要,需要从技术角度给出方案设计的目标 | ||
- 比如对于图片下载需求,需要完成相关的功能,那么设计目标主要有完成异步下载、存储、缓存设计、图片解码、渲染等功能。 | ||
- 比如对于优化需求,目标可以是达到一个什么效果?可以是帧率的、Crash率的、卡顿的等。 | ||
- 比如对于重构需求,目标可以是加强扩展、解决问题、提升效率等。 | ||
|
||
|
||
|
||
### 02.方案设计 | ||
- 方案设计是技术文档的最核心部分,主要包括了整体架构和功能设计,这里需要体现: | ||
- 设计的初衷:概要描述方案设计的思考,可以是为了扩展性的考虑,可以是提升性能 | ||
关键技术点的思考:描述关键技术选型的思考,比如要解耦,业内解耦方案能有router、Target-Action等,讲清楚选择的思考 | ||
- 技术上的折中/取舍:在做技术设计的时候,往往要的很多,但时间有限,那么这个需要讲一下折中与取舍,以及接下来的规划、计划 | ||
|
||
|
||
|
||
#### 2.1 整体架构 | ||
- 整体架构的组成需要有一张完成的架构设计图,描述清楚具体的分层以及层与层之间的关系 | ||
- 比如传统的开发会分为三层,展示层、逻辑层、数据层 | ||
- 展示层的设计:视图的构成、视图间的耦合关系、具体的交互逻辑 | ||
- 逻辑层的设计:支撑展示层所需要的数据、从数据层获取数据的加工、业务相关逻辑(比如轮询服务) | ||
- 数据层的设计:数据的获取方式以及存储方式,文件、数据库、本地、网络 | ||
|
||
|
||
|
||
#### 2.2 功能设计 | ||
- 功能设计包含但不限于以下几个部分:逻辑流程图、接口设计图、与外部的模块间依赖关系 | ||
|
||
#### 2.2.1 关键流程图 | ||
- 设计中的最复杂、最关键的逻辑需要画出流程图,实在画不出的流程图需要用语言描述清楚。 | ||
- 关键流程需要有逻辑流程图,帮助其他同学理解功能的关键节点逻辑 | ||
|
||
|
||
##### 2.2.2 接口设计图 | ||
- 通过UML类图来展示类间关系,描述清楚接口设计的一些思考原则 | ||
- 提供的接口,往往接口设计为了完成相关逻辑 | ||
|
||
|
||
|
||
##### 2.2.3 模块间依赖关系 | ||
- 描述清楚和哪些模块存在依赖关系以及原因,比如首页依赖于购物车模块,需要解释清楚要强耦合,有没有办法解耦 | ||
- App内部模块间依赖 | ||
- App外部依赖 | ||
|
||
|
||
#### 2.3 UI/动效设计 | ||
- 客户端开发有很大一部分精力在UI/动效上,对于复杂的静态UI和复杂动效,需要给出实现方案和选型逻辑 | ||
- 静态UI | ||
- 只有复杂的UI才需要给出设计方案,例如核心页面大重构、复杂的协调布局等 | ||
- 复杂动效 | ||
- 复杂的动效是端上容易踩坑的关键点,需要给出实现方案的对比、选型等,为验证动效可行性,可以给出动效Demo | ||
|
||
|
||
|
||
### 03.其他设计(Optional) | ||
- 以下部分是可选项,主要是从异常、兼容性、性能、稳定性、灰度、降级等维护来设计。 | ||
|
||
|
||
#### 3.1 性能设计 | ||
- 有些业务项目可能会考虑性能,比如列表页,卡顿、流畅度怎么样?如何评估? | ||
- 有些技术项目可能也会考虑性能,比如数据库设计,检索性能如何?是否有瓶颈,如何评估? | ||
|
||
|
||
#### 3.2 稳定性设计 | ||
- 大的项目需要考虑性能如何保障? | ||
- 比如方案 Review | ||
- 比如自测Case Review,加强自测 | ||
- 比如单测 | ||
|
||
|
||
#### 3.3 灰度设计 | ||
- 核心关键功能需要有A/B设计 | ||
- 比如UIWebview替换为WKWebview,其中存在很多不确定因素,需要做好灰度设计 | ||
|
||
|
||
#### 3.4 降级设计 | ||
- 在做一些新技术尝试时,需要考虑降级设计 | ||
- 比如RN、swift、weex引入对原有业务造成影响的,需要有兜底,可降级 | ||
- 参考资料 | ||
- 需要列出方案设计过程的文档,包括但不局限于PM需求文档,技术参考文档等。 | ||
|
||
|
||
#### 3.5 异常设计 | ||
- 大部分业务需求都会涉及到异常处理,在关心主流程的同时需要关注异常场景怎么保证正确性? | ||
- 比如用户操作中途退出、网络异常、数据被清理等 | ||
|
||
|
||
#### 3.6 兼容性设计 | ||
- 业务逻辑一般不会涉及到兼容性,但UI/动效需求容易遇到兼容性问题,也是提测时需要让QA关注的 | ||
- 比如独立端/嵌入端、高低版本API适配等 | ||
|
||
|
||
### 04.排期与计划 | ||
- 排期计划主要针对周期较长项目的时间补充,对于小型项目不需要,例如: | ||
- 正常的版本业务需求,5pd以下,不需要给出排期计划;5pd或者以上,可以简单描述一下排期和提测时间 | ||
- 跨版本的大型业务需求、重构专项等,需要给出详细的排期计划 | ||
- 研发自驱的技术优化项目,需要给出详细的排期计划 | ||
|
||
|
||
### 05.参考资料 | ||
- 需要列出方案设计过程的文档,包括但不局限于PM需求文档,技术参考文档等。 | ||
|
||
|
||
- Gradle学习(八) 统计Task执行时长 | ||
- https://blog.csdn.net/chennai1101/article/details/103280523/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
- 落实反馈 | ||
|
||
|
||
|
||
### 01.概述 | ||
#### 1.1 项目背景 | ||
- 通过简要的语言描述项目背景以及要达成的业务目标。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
|
||
|
||
|
||
### 03.转发和重定向 | ||
- 转发和重定向的区别是什么? | ||
- 转发是服务器行为,重定向是客户端行为 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
|
||
|
||
|
||
|
||
### 01.为何会有Https | ||
#### 1.1 Http的缺点 | ||
- 通信使用明文; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters