[nodejs] Re: Best Pattern to wrap class hierarchy

2012-12-12 Thread lent
Hi Bradley, thanks for the reply, but maybe I have not expressed clearly: I don't want to *convert* my c++ classes to javascript. Instead, I create a *custom module* with *node::ObjectWrap* class AnimalWrap : public node::ObjectWrap { public: static HandleValue sound(const Arguments

[nodejs] Re: Best Pattern to wrap class hierarchy

2012-12-10 Thread Bradley Meck
Encapsulated bindings. Make all bindings available w/ some naming convention for the namespaces. Have a constructor function per type * Have Animal.prototype be the members of Animal:: * Have Dog.prototype be the members of Dog:: Attach the static functions to constructor functions Add sugar if