- 博客(10)
- 收藏
- 关注
原创 Eliminate unchecked warnings
When you program with generics, you will see many compiler warnings: unchecked cast warnings, unchecked method invocation warnings, unchecked generic array creation warnings, and unchecked conversio...
2012-01-04 16:34:52 125
原创 Favor static member classes over nonstatic
One common use of a static member class is as a public helper class, useful only in conjunction with its outer class. For example, consider an enum describing the operations supported by a calculato...
2012-01-04 11:41:22 140
原创 Minimize the accessibility of classes and members
The rule of thumb is simple: make each class or member as inaccessible as possible. In other words, use the lowest possible access level consistent with the proper functioning of the software that y...
2011-12-31 14:07:41 107
原创 Command vs Strategy
public class ConcreteStrategy implements BaseStrategy { @Override public void execute(Object argument) { // Work with passed-in argument. } } public class ConcreteCo...
2011-12-16 15:24:36 159
原创 Tomcat的HttpConnector和HttpProcessor线程交互
The processor thread (the await method) while (!available) { wait(); } Socket socket = this.socket; available = false; notifyAll(); return socket; The connector thread (the assign metho...
2011-12-16 14:51:42 83
原创 Tomcat 系统构架(转)
Tomcat 总体结构 Tomcat 的结构很复杂,但是 Tomcat 也非常的模块化,找到了 Tomcat 最核心的模块,您就抓住了 Tomcat 的“七寸”。下面是 Tomcat 的总体结构图: 图 1.Tomcat 的总体结构 从上图中可以看出 Tomcat 的心脏是两个组件:Connector 和 Container,关于这两个组件将在后面详...
2011-12-16 11:03:30 100
原创 Web Tier Design Goals
Web Tier Design Goals Naïve approaches toward J2EE web tier implementation typically result in JSP pages containing excessive amounts of Java scriptlets, with a confused mixture of presentation and ...
2011-12-14 17:35:45 102
原创 MemcachedClient Configuration(from githun)
You have two options to configure the MemcachedClient: using the app.config, providing an object which implements IMemcachedClientConfiguration App.config (or web.config) is recommended when yo...
2011-12-13 18:32:04 298
原创 Strategy Pattern的位置
I'm including an encapsulation hierarchy table of several of the GoF design patterns to help explain the differences between these two patterns. Hopefully it better illustrates what each encapsula...
2011-12-12 10:02:48 72
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人