개요
crockford 횽의 글만 읽으면 대충 자바스크립트 상속에 대한 구현 방법은 이해할 수 있다. 귀찮으니까 설명은 생략한다. :)
- inheritance : 맨 마지막 줄이 핵심이다 :P
- prototypal
- private
Sample Codes
- goog.inherits()
- backbone.js extend()
- Base.js
- inheritance(prototype plugin)
- jquery-inheritance/
- JavascriptMVC Class
- JS.Class
- John Resig’s Simple JavaScript Inheritance
여담이지만, 조만간 JSON 기반 프로토콜을 온라인 게임에서 사용하는 게 당연한 세상이 올지도 모르겠다.