Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javascript inheritance - from abstract idea to actual code

i know how to inherit in c++, vb(6-shame on me), and php

I saw many examples and tutorials about it regarding javascript. but no simple explanation about it. What i need is an starting point that will leave me with the need to learn "just" the syntax and usage.

hope i am clear enough. thanks

like image 399
yossi Avatar asked Apr 28 '26 02:04

yossi


2 Answers

http://www.crockford.com/javascript/inheritance.html

check that out. Note prototypal inheritance is nothing like classical inheritance.

like image 113
hvgotcodes Avatar answered Apr 30 '26 16:04

hvgotcodes


Crockford is the king - so I highly recommend reading the link provided by @hvgotcodes

Since you asked for practical implementation, I wrote up an example a while back showcasing the practical application of the OO paradigm in JS -

http://tikkunology.blogspot.com/2010/02/practical-object-oriented-javascript.html

Hopefully it'll help

like image 37
Nirvana Tikku Avatar answered Apr 30 '26 15:04

Nirvana Tikku



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!