Code Review中应该关注的点
2024-10-18 19:29:05
- Magic number/string
- If statement, you should always use single line or brackets
- Provide default value of Enum
- Difference between abstract class and interface
- Excess inheritance--the inheritance hierarchy is too deep
- Use string.Concat, string.Format, StringBuilder instead of +
- Const vs Readonly
- Break down large method into small methods
- Using nest class to hidden information is not necessary and hurts maintainability
- Do not use new keyword to hidden base class's method, please use polymorphism
- Static class may substitute singleton pattern for simplification
- Private members/property access are not necessary if not protecting; use auto properties instead
- Use IDisposable correctly to prevent resource leak for unmanaged resources.
- Tell browser the encoding you are using with meta tag
- Make sure browsers know you want to use edge rendering if you are building HTML5 websites
- Eliminating embedded javascript and style sheets to help improve caching of your code
- Use CDN so that browser caching can improve startup time for new users.
- Reduced round-trips with fewer CSS files means you are less likely to run into browser limits of CSS
- The less code inside a Razor file the better
- Creating cached objects inside per-request classes is not necessary and adds complexity
- Routing tables are still a valid way of doing routing for much your code
最新文章
- 以太坊智能合约Hello World示例程序
- Nginx编译配置杂记
- 阴影 box-shadow(二)
- CS001: 清理浮动的几种方法以及对应规范说明
- MySQL触发器 Update触发Insert失败
- ini_set /ini_get函数功能-----PHP
- 【转】创业C2C(Copy To China):停车位共享APP,用户、市政能够买账?
- uva 10739
- unity3d 2d游戏制作的模式
- java中二维数组内存分配
- (后端)Sql Server日期查询-SQL查询今天、昨天、7天内、30天(转)
- 图解JAVA参数传递
- Tensorflow 搭建神经网络及tensorboard可视化
- C#基础知识回顾--串行化与反串行化
- Keepalived+Nginx高可用集群
- Smarty 函数
- HDU 1358
- Java核心技术-集合
- 【Semantic Segmentation】 Instance-sensitive Fully Convolutional Networks论文解析(转)
- PLSQL基本操作手册
热门文章
- .net后台 Silverlight 页面 动态设置 ASPX 页面 控件的Margin值(位置设置)
- dispatch_async 与 dispatch_get_global_queue 的使用方法
- 判别linux机器字节序为大端还是小端
- C++格式化字符函数
- seajs模块压缩问题
- 微信JS-SDK 接口调用与 php 遇到的坑
- 简单的thinkPHP3.2运行实例。
- [TYVJ] P1238 路径
- oracle starup报错
- 设置ActioinBar 的背景色以及Title的字体颜色