Standard Inheritance System for node.js and browsers (including IE6)?
-
09-10-2019 - |
Question
I am looking for a Standard Inheritance System that can work in both node.js and browsers.
sys.inherits doesn't work in old browsers (Object.create).
All js libraries (jquery, extjs, dojo...) have similar but diff inherit systems. (Don't know which one is good for node.js)
Want to use one which is simple and may become the "standard" in the future (at least in node.js based system).
Any idea? Which one are you using?
Also found some interesting projects:
http://howtonode.org/prototypical-inheritance (Not good for IE)
http://jsclass.jcoglan.com/modules.html (Too large, too ruby?)
By the way, I am using require.js in frontend.
Thanks
Solution
Use node.js' sys.inherits server side, use whatever your framework uses in the front end.
Keep it simple.