摘要:
原文:http://www.dofactory.com/javascript-builder-pattern.aspxfunction Shop() { this.construct = function(builder) { builder.step1(); builder.step2(); return builder.get(); }}function CarBuilder() { this.car = null; this.step1 = function() { this.car = new Car();... 阅读全文