Design patterns, many people have been used, just do not know its name, generally a very nice system, modular do are very good, so if a new business, just need to assemble each module can meet the new business,
From the point of view of the program, is that we only need to open a class, and then constantly to adjust the module method, assembly on the OK, code reusability is relatively good, but for the new employees, they are not clear, the system has been modular,
At this time, the old staff to use the appearance of the model is particularly important, the general experience of the old staff will provide an interface for the new employees to call, the specific internal logic is used by the old staff to use the appearance mode to complete, in fact, the old staff code is very small.
Liar design mode-Class diagram
Let's take a cooking example and look at the actual Java code:
/** * */ Public class Subsystemone { publicvoid Buyrice () { System.out.println ("Buy rice" ); }}
/** * */ Public class Subsystemtwo { publicvoid Washfood () { System.out.println (" Wash rice and wash vegetables ");} }
/** * Subsystem class */ public class Subsystemthree { public void Span style= "color: #000000;" > Makefood () {System.out.println ( cooking "); }}
/** * */ Public class Test { publicstaticvoid main (string[] args) { new facade (); Façade. Method (); }}
The output is:
Buy rice and rice to wash vegetables and cook
Can see the process of cooking are all, we just need to put together these processes, is a cooking process, you can see how the system modularity, directly affect the subsequent development speed.
The above is the author of the appearance of the understanding of the model, hope to help learn the children's shoes!
Java view mode (big talk design mode)