这个东西主要是为了提供一个统一的接口,然后为了解耦用的。 同时也同时也带来了代码的复杂度。使得代码的流水线长,wrapper太多,实际干活的代码不好找。usage in jvm:in javax.faces.context, ExternalContext internally use ServletContext, HttpSession, HttpServletRequest, HttpServletResponse, etc, It ...【阅读全文】
Composite pattern 在你需要tree 的时候,会是选择之一。The Composite Pattern allows you to compose object into a tree structure to represent the part-whole hierarchy which means you can create a tree of objects that is made of different parts.but that can be treated as a whole one big thi...【阅读全文】
The intent of the builder Pattern is to separate the construction of complex object from its representation,so that the same construction process can create different representation. Adding a new implementation (i.e adding a new builder) becomes easier, the object construction process becomes...【阅读全文】