說明架構
我認爲三層架構中的BLL,Service,BusinessFacade都是門面模式的體現,封裝邏輯細節的實現和複雜數據的展現,只提供給應用簡單的接口調用.上層應用能夠不關注邏輯細節和數據是從哪裏來的.spa
class Logic1 { public void Exc() { Console.WriteLine("執行Logic1完成"); } } class Logic2 { public void Exc() { Console.WriteLine("執行Logic2完成"); } } public class LogicFacade { Logic1 logic1; Logic2 logic2; public LogicFacade() { logic1 = new Logic1(); logic2 = new Logic2(); } public void Exc() { logic1.Exc(); logic2.Exc(); Console.WriteLine("Logic所有執行完成"); } } LogicFacade logicFacade = new LogicFacade(); logicFacade.Exc();