Command 패턴 정리
* 요청 내역을 객체로 캡슐화하여 클라이언트를 서로 다른 요청 내역에 따라 매개 변수화 할 수 있습니다. 요청을 큐에 저장하거나 로그로 기록 할 수 도 있고 작업취소 기능을 지원 할 수 도 있습니다. var oSimpleRemote = new SimpleRemoteControl(); var oLight = new Light(); var oLightCommand = new LightOnCommand(oLight); oSimpleRemote.setCommand(oLightCommand); oSimpleRemote.buttonWasPressed(); oSimpleRemote.buttonUndoWasPressed(); // Light var Light = function(){ this.bOn = false; }..
웹개발/Javascript
2011. 10. 18. 17:28