
目录
更新日志
2019/08/09 | 完成v1.0版本文档 | CraigTaylor |
开发环境
开发工具
代码管理
项目代码
分支管理
Develop | 起到了Master分支的作用,作为最终上线代码 | 发起并入需要审核 |
CustomBranch | 私人分支,基于最新代码新建,修改后合并进入Develop | |
名称管理
分支名称建议采用"用户名
-版本标记
-发布模式
-创建年月日
"格式
例如:
- Taylor-CN-Develop-20190701
- Taylor-US-Develop-20190901
Tag名称建议采用"版本标记
-发布模式
-创建年月日
-版本号
"格式
例如:
- CN-Release-20191001-v1.0.0.0
- US-Release-20191001-v1.0.0.0
打包管理
存储路径
标准版 | \共享存储\Demo\Demo.Client\测试版 | \共享存储\Demo\Demo.Client\正式版 |
存储结构
测试包
发布模式 -版本号 -版本名称 .zip | 解压即用的程序集(必须) | Test-v1.0.0.0-标准版.zip |
发布模式 -版本号 -版本名称 -更新日志 .docx | 指定版本的更新日志(建议) | Test-v1.0.0.0-标准版-更新日志.docx |
正式包
Demo -版本号 .msi | 全新安装的安装包 | Demo1.0.0.0.msi |
发布模式 -版本号 .zip | 升级更新的升级包 | Release-v1.0.0.0.zip |
名称管理
压缩包名建议采用"发布模式
-版本号
-版本名称
.zip
"格式
例如:
- Develop-v1.0.0.0-标准版.zip
- Test-v1.0.0.0-标准版.zip
- Preview-v1.0.0.0-标准版.zip
- Release-v1.0.0.0-标准版.zip
更新日志建议采用"发布模式
-版本号
-版本名称
-更新日志
.docx
"格式
例如:
- Develop-v1.0.0.0-标准版-更新日志.docx
- Test-v1.0.0.0-标准版-更新日志.docx
- Preview-v1.0.0.0-标准版-更新日志.docx
- Release-v1.0.0.0-标准版-更新日志.docx
依赖组件
内部组件
外部组件
Autofac | 自动注册框架 | 4.8.1 |
AutoMapper | 自动映射框架 | 8.0.0 |
MvvmLight | MVVM绑定框架 | 5.4.1.1 |
MvvmLightLibs | MVVM绑定框架 | 5.4.1.1 |
Newtonsoft.Json | JSON解析框架 | 12.0.1 |
Google.Protobuf | Google二进制协议 | 3.7.0 |
log4net | 本地日志记录 | 2.0.8 |
WPFLocalizeExtension | 多语言扩展 | 3.3.1 |
解决方案结构
解决方案命名
解决方案文件夹
基础层 | 0.Demo.Client.Infrastructure | |
领域层 | 1.Demo.Client.Domain | |
应用层 | 2.Demo.Client.Application | |
测试集 | DemoTestProject | |
主要程序 | Demo | |
升级程序 | DemoAutoUpdater | |
打包项目 | Setup1 | |
项目文件夹
0.Demo.Client.Infrastructure
Demo.Client.DataBaseAccess | 操作本地数据库 |
Demo.Client.DataContract | 接口涉及的数据模型 |
Demo.Client.Domain.Query | 领域查询 |
Demo.Client.Infrastructure.IQuery | 基础框架之接口定义 |
Demo.Client.Infrastructure.Utility | 基础框架之全局帮助类 |
1.Demo.Client.Domain
Demo.Client.DomainModel | 领域模型 |
2.Demo.Client.Application
Demo.Client.Application.Imp | 接口实现层 - 应用服务(包括第三方) |
Demo.Client.IApplication | 接口定义层 - 应用服务 |
Demo.Client.IRemotingService | 接口定义层 - 第三方 |
DemoTestProject
Infrastructure.ConsoleTest | N/A |
命名规范
文件目录
\Demo\Views \ | 存放界面 |
\Demo\Views \UserControls \ | 存放自定义控件 |
\Demo\ViewModels \ | 存放绑定 |
\Demo\TemplateSettings \ | 存放打印模板 |
\Demo\Styles \ | 存放样式文件 |
\Demo\Models \ | 存放主程序用的模型 |
\Demo\Languages \ | 存放多语言字典 |
\Demo\Converter \ | 存放界面转换器 |
\Demo\Controls \ | 存放基础控件 |
\Demo\Common \ | 存放主程序非业务帮助类 |
\Demo\BusinessCommon \ | 存放主程序业务帮助类 |
\Demo\ClientEnum \ | 存放主程序枚举 |
\Demo\Update \ | 存放主程序升级检查 |
文件命名
业务名称 .cs | 领域模型(数据库用) | LearnCore.cs |
业务名称 Item.cs | 领域模型(列表子项) | LearnCoreItem.cs |
业务名称 Dto.cs | 数据模型(接口服务用) | LearnCoreDto.cs |
业务名称 DtoFor分组名称 .cs | 数据模型(分组拆分) | LearnCoreDtoForPrice.cs |
业务名称 ItemDto.cs | 数据模型(列表子项) | LearnCoreItemDto.cs |
业务名称 ViewDto.cs | 绑定模型(界面绑定) | LearnCoreViewDto.cs |
业务名称 ViewDtoFor分组名称 .cs | 绑定模型(分组拆分) | LearnCoreViewDtoForPrice.cs |
业务名称 Page.xaml | 界面定义 | MainPage.xaml |
业务名称 Control.xaml | 控件定义 | MainControl.xaml |
业务名称 ViewModel.cs | 绑定定义(数据绑定) | MainViewModel.cs |
业务名称 ViewModelFor分组名称 .cs | 绑定定义(分组拆分) | MainViewModelForLearnCore.cs |
代码命名
I 业务名 RemotingService | 接口定义 - 学习API服务 | ILearnCoreRemotingService |
业务名 RemotingService | 接口实现 - 学习API服务 | LearnCoreRemotingService |
I 业务名 Service | 接口定义 - 学习服务 | ILearnCoreService |
业务名 Service | 接口实现 - 学习服务 | LearnCoreService |
I 数据表名 QueryService | 接口定义 - 学习查询数据 | ILearnCoreQueryService |
数据表名 QueryService | 接口实现 - 学习查询数据 | LearnCoreQueryService |
辅助调试
附加自动策略
添加位置
\App_Data\LocalConfigs\PublishMode.json
配置说明
PublishMode
描述发布模式
Release | 正式上线-正式环境 | 1 |
Preview | 发布预览-正式环境 | 2 |
Test | 测试使用-测试环境 | 3 |
Develop | 开发自用-测试环境 | 4 |
AutomaticType
描述自动操作
AutoLogin | 自动登录 | 1 |
MainFullScreen | 主界面全屏 | 2 |
ViceSizeScreen | 自定义副屏尺寸 | 3 |
配置举例
{
"PublishMode": 4,
"PublishName": "开发自用-测试环境",
"AutomaticConfigs":[
{
"AutomaticType": 1,
"AutomaticName": "自动登录,XXX家的账号",
"AutomaticValues":[ "username","@userSuffix","password"]
},
{
"AutomaticType": 2,
"AutomaticName": "主界面全屏",
"AutomaticValues":[ false ]
},
{
"AutomaticType": 3,
"AutomaticName": "缩小副屏",
"AutomaticValues":[ 1024,600]
}
]
}
{
"PublishMode": 3,
"PublishName": "测试使用-测试环境",
"AutomaticConfigs":[
{
"AutomaticType": 1,
"AutomaticName": "自动登录,XXX家的账号",
"AutomaticValues":[ "username","@userSuffix","password"]
},
{
"AutomaticType": 2,
"AutomaticName": "主界面全屏",
"AutomaticValues":[ false ]
},
{
"AutomaticType": 3,
"AutomaticName": "缩小副屏",
"AutomaticValues":[ 1024,600]
}
]
}
公共资源
.Net Core