首页 > 学习, 软件设计 > Daniel-Journey Weekly Dose-2009/11/29

Daniel-Journey Weekly Dose-2009/11/29

2009年11月29日 admin 发表评论 阅读评论

Java

Spring 的优秀工具类盘点,第 1 部分: 文件资源操作和 Web 相关工具类

Spring 的优秀工具类盘点,第 2 部分: 特殊字符转义和方法入参检测工具类

Thoughts on Java logging and SLF4J

Getting Started with Terracotta

性能测试项目总结之内存泄露和内存溢出

Terrocotta – 基于JVM的Java应用集群解决方案

面向对象设计

Applying Strategy Pattern Instead of Using Switch Statements

What we gain by using Strategy Pattern?
  • The code is easier to read. I don’t need to go and read (or
    search) an “endless” switch statement to understand each
    aspect of the code.
  • The code is more maintainable. I only need to go to the
    relevant class that implement the algorithm in order to change it
    or refactor it when needed.
  • It is easier to add more algorithms. I only need to add more classes
    to the pile of algorithms and that is it. Doing so helps us to imply
    the Open / Closed Principle because in switch statement we are going 
    to have to change our code (add another case statement) in opposed
    to Strategy which we add another algorithm class.
  • Strategy Pattern is more testable.

数据库

Top 20+ MySQL Best Practices

其他

Transfer Obejcts vs Business Objects – Which Approach Works Best

分类: 学习, 软件设计 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.