Suche senden
Hochladen
Refactoring
•
0 gefällt mir
•
313 views
D
dreampuf
Folgen
This slide contains a number of points should be noted that in the refactoring
Weniger lesen
Mehr lesen
Technologie
Melden
Teilen
Melden
Teilen
1 von 24
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
高性能LAMP程序设计
高性能LAMP程序设计
fuchaoqun
高性能Lamp程序设计 付超群
高性能Lamp程序设计 付超群
Shaoning Pan
Lamp高性能设计
Lamp高性能设计
锐 张
轻量级Flash服务器开发框架(刘恒)
轻量级Flash服务器开发框架(刘恒)
FLASH开发者交流会
Mysql fast share
Mysql fast share
rfyiamcool
[Flash开发者交流][2010.05.30]轻量级flash服务器开发框架 刘恒
[Flash开发者交流][2010.05.30]轻量级flash服务器开发框架 刘恒
Shanda innovation institute
腾讯大讲堂19 系统优化的方向
腾讯大讲堂19 系统优化的方向
areyouok
百姓网如何优化网速-Qcon2011
百姓网如何优化网速-Qcon2011
Yiwei Ma
Empfohlen
高性能LAMP程序设计
高性能LAMP程序设计
fuchaoqun
高性能Lamp程序设计 付超群
高性能Lamp程序设计 付超群
Shaoning Pan
Lamp高性能设计
Lamp高性能设计
锐 张
轻量级Flash服务器开发框架(刘恒)
轻量级Flash服务器开发框架(刘恒)
FLASH开发者交流会
Mysql fast share
Mysql fast share
rfyiamcool
[Flash开发者交流][2010.05.30]轻量级flash服务器开发框架 刘恒
[Flash开发者交流][2010.05.30]轻量级flash服务器开发框架 刘恒
Shanda innovation institute
腾讯大讲堂19 系统优化的方向
腾讯大讲堂19 系统优化的方向
areyouok
百姓网如何优化网速-Qcon2011
百姓网如何优化网速-Qcon2011
Yiwei Ma
Lamp优化实践
Lamp优化实践
zhliji2
高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕
ideawu
EventProxy introduction - JacksonTian
EventProxy introduction - JacksonTian
Jackson Tian
Sun JDK 1.6内存管理 -调优篇
Sun JDK 1.6内存管理 -调优篇
bluedavy lin
mysql dbug
mysql dbug
Tim Chou
Ria的强力后盾:rest+海量存储
Ria的强力后盾:rest+海量存储
zhen chen
高性能的Java代码编写及常见问题排查
高性能的Java代码编写及常见问题排查
bluedavy lin
Sun jdk 1.6内存管理 -使用篇
Sun jdk 1.6内存管理 -使用篇
bluedavy lin
The introduction of data visualization
The introduction of data visualization
dreampuf
Communication with python_http_module
Communication with python_http_module
dreampuf
Python client api
Python client api
dreampuf
Python magicmethods
Python magicmethods
dreampuf
Machine learning share No.1
Machine learning share No.1
dreampuf
Python profiling
Python profiling
dreampuf
A short introduction of D3js
A short introduction of D3js
dreampuf
The Outcome Economy
The Outcome Economy
Helge Tennø
OPOA in Action -- 使用MagixJS简化WebAPP开发
OPOA in Action -- 使用MagixJS简化WebAPP开发
leneli
MySQL新技术探索与实践
MySQL新技术探索与实践
Lixun Peng
互联网创业服务器运维工具集
互联网创业服务器运维工具集
zhen chen
Api Code Pack For Net Framework
Api Code Pack For Net Framework
Chui-Wen Chiu
Micro service
Micro service
rfyiamcool
构建基于Lamp的网站架构
构建基于Lamp的网站架构
Cosey Lee
Weitere ähnliche Inhalte
Was ist angesagt?
Lamp优化实践
Lamp优化实践
zhliji2
高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕
ideawu
EventProxy introduction - JacksonTian
EventProxy introduction - JacksonTian
Jackson Tian
Sun JDK 1.6内存管理 -调优篇
Sun JDK 1.6内存管理 -调优篇
bluedavy lin
mysql dbug
mysql dbug
Tim Chou
Ria的强力后盾:rest+海量存储
Ria的强力后盾:rest+海量存储
zhen chen
高性能的Java代码编写及常见问题排查
高性能的Java代码编写及常见问题排查
bluedavy lin
Sun jdk 1.6内存管理 -使用篇
Sun jdk 1.6内存管理 -使用篇
bluedavy lin
Was ist angesagt?
(8)
Lamp优化实践
Lamp优化实践
高性能并发Web服务器实现核心内幕
高性能并发Web服务器实现核心内幕
EventProxy introduction - JacksonTian
EventProxy introduction - JacksonTian
Sun JDK 1.6内存管理 -调优篇
Sun JDK 1.6内存管理 -调优篇
mysql dbug
mysql dbug
Ria的强力后盾:rest+海量存储
Ria的强力后盾:rest+海量存储
高性能的Java代码编写及常见问题排查
高性能的Java代码编写及常见问题排查
Sun jdk 1.6内存管理 -使用篇
Sun jdk 1.6内存管理 -使用篇
Andere mochten auch
The introduction of data visualization
The introduction of data visualization
dreampuf
Communication with python_http_module
Communication with python_http_module
dreampuf
Python client api
Python client api
dreampuf
Python magicmethods
Python magicmethods
dreampuf
Machine learning share No.1
Machine learning share No.1
dreampuf
Python profiling
Python profiling
dreampuf
A short introduction of D3js
A short introduction of D3js
dreampuf
The Outcome Economy
The Outcome Economy
Helge Tennø
Andere mochten auch
(8)
The introduction of data visualization
The introduction of data visualization
Communication with python_http_module
Communication with python_http_module
Python client api
Python client api
Python magicmethods
Python magicmethods
Machine learning share No.1
Machine learning share No.1
Python profiling
Python profiling
A short introduction of D3js
A short introduction of D3js
The Outcome Economy
The Outcome Economy
Ähnlich wie Refactoring
OPOA in Action -- 使用MagixJS简化WebAPP开发
OPOA in Action -- 使用MagixJS简化WebAPP开发
leneli
MySQL新技术探索与实践
MySQL新技术探索与实践
Lixun Peng
互联网创业服务器运维工具集
互联网创业服务器运维工具集
zhen chen
Api Code Pack For Net Framework
Api Code Pack For Net Framework
Chui-Wen Chiu
Micro service
Micro service
rfyiamcool
构建基于Lamp的网站架构
构建基于Lamp的网站架构
Cosey Lee
你的 JS 該減肥了!5個提升網頁載入速度的技巧 - Modern Web 2020
你的 JS 該減肥了!5個提升網頁載入速度的技巧 - Modern Web 2020
Shubo Chao
淘宝彩票移动项目开发实践
淘宝彩票移动项目开发实践
alvis-m
大话Php之性能
大话Php之性能
liqiang xu
Django敏捷开发 刘天斯
Django敏捷开发 刘天斯
liuts
从无阻塞并行脚本加载(Lab.js)到浏览器消息模型
从无阻塞并行脚本加载(Lab.js)到浏览器消息模型
Jackson Tian
开源应用日志收集系统
开源应用日志收集系统
klandor
Web性能测试指标参考v0.2
Web性能测试指标参考v0.2
beiyu95
Vulkan introduction
Vulkan introduction
Jiahan Su
淘宝商品库MySQL优化实践
淘宝商品库MySQL优化实践
Feng Yu
使用Nginx轻松实现开源负载均衡
使用Nginx轻松实现开源负载均衡
cachowu
Node js feat pegasus
Node js feat pegasus
cnfi
未来网络技术发展探梦 - 开篇
未来网络技术发展探梦 - 开篇
Yao-Wei Ou
Mybatis学习培训
Mybatis学习培训
flynofry
Mysql handlersocket
Mysql handlersocket
pwesh
Ähnlich wie Refactoring
(20)
OPOA in Action -- 使用MagixJS简化WebAPP开发
OPOA in Action -- 使用MagixJS简化WebAPP开发
MySQL新技术探索与实践
MySQL新技术探索与实践
互联网创业服务器运维工具集
互联网创业服务器运维工具集
Api Code Pack For Net Framework
Api Code Pack For Net Framework
Micro service
Micro service
构建基于Lamp的网站架构
构建基于Lamp的网站架构
你的 JS 該減肥了!5個提升網頁載入速度的技巧 - Modern Web 2020
你的 JS 該減肥了!5個提升網頁載入速度的技巧 - Modern Web 2020
淘宝彩票移动项目开发实践
淘宝彩票移动项目开发实践
大话Php之性能
大话Php之性能
Django敏捷开发 刘天斯
Django敏捷开发 刘天斯
从无阻塞并行脚本加载(Lab.js)到浏览器消息模型
从无阻塞并行脚本加载(Lab.js)到浏览器消息模型
开源应用日志收集系统
开源应用日志收集系统
Web性能测试指标参考v0.2
Web性能测试指标参考v0.2
Vulkan introduction
Vulkan introduction
淘宝商品库MySQL优化实践
淘宝商品库MySQL优化实践
使用Nginx轻松实现开源负载均衡
使用Nginx轻松实现开源负载均衡
Node js feat pegasus
Node js feat pegasus
未来网络技术发展探梦 - 开篇
未来网络技术发展探梦 - 开篇
Mybatis学习培训
Mybatis学习培训
Mysql handlersocket
Mysql handlersocket
Refactoring
1.
Refactoring
dreampuf
2.
Insight
3.
4.
5.
Compare
6.
400
UbbParser nutshell/gksite/views_index 320 Text2pic Django:core/cache/backend/memcache 240 160 80 0 SLOC
7.
8
UbbParser nutshell/gksite/views_index Text2pic Django:core/cache/backend/memcache 6 4 2 0 maxBlockDepth
8.
300
UbbParser nutshell/gksite/views_index 240 Text2pic Django:core/cache/backend/memcache 180 120 60 0 numBlocks
9.
50
UbbParser nutshell/gksite/views_index 40 Text2pic Django:core/cache/backend/memcache 30 20 10 0 DocString(%)
10.
一种修改,使软件的内部结构更容易理解,在不改 变软件的可见行为方式前提下使软件更容易变更… 它是一种有节制的整理代码、使bug产生几率最小 化的方法。
- Martin Fowler & Kent Beck
11.
设计原则
12.
设计原则 OCP open-closed principle SRP
single responsibility principle ISP interface segregation principle LSP Liskov substitution principle DIP dependency inversion principle
13.
坏味道
14.
坏味道 重复 过长函数 过长的参数列表 散弹式修改 耦合 为未来着想太多 低内聚
15.
测试
16.
测试 测试自动化 频繁运行保值 为每一个Bug创建一个UT 集中火力对付边界条件 UT是昂贵的成本 为测试而设计
17.
技巧
18.
技巧 小步重构 同时只做一项重构 有TODO list UT
19.
20% 其他 80%
20.
文档化 好样式,简单代码 有意义的名称 分解为原子函数 描述性类型 强调重要的代码 提供文件头 恰当的错误处理 有意义的注释
21.
22.
沟通
23.
Reference
24.
Thanks!
Jetzt herunterladen