klenwell information services : HocObject

Wiki source for HocObject

Show raw source

=====HocObject: Neo-Parasitic =====

HocObject is a basic (i.e., quick and dirty) inheritance paradigm I'm working on to simplify classical class inheritance behavior in Javascript. I don't work with Javascript regularly enough to have invested myself in the prototypal idiom. This is my quixotic effort to bend Javascript objects to behave more like Python objects. I fully expect it, in the end, to lead me to a fuller appreciation of Javascript's prototypal nature.

=== Requirements ===
~- Encapsulated class definitions
~- Basic object type identification
~- Simple, encapsulated method overriding
~- No more than two "magic" property (e.g. self.hoc)
~- No more than two "magic" methods (e.g. self.is_a)

=== Demonstrations ===
~- [[http://jsfiddle.net/klenwell/RV4a3/ | Generic Example]]
~- Practical Example (with KineticJS)