When I started my career about 5 or so years ago I didnt know much about JavaScript, but I knew something about object oriented analysis and design. OOAD in this case was the classical approach to OO where an object is an instance, which means that each thing or object that you create in a system must first be instantiated, and this is something that does not happen in JavaScript at all really. Everything in JavaScript is object-based, there is no class instantiating as in the classical OO approach. The other thing that is quite notable is that it takes a bit of a work around to create some sort of inheritance in JavaScript, its not something that exists in the language itself. Similarly a thing like polymorphism is not a language feature as it is in say C#. With all that being said though, it does not mean that these features cannot be created in JavaScript, it just means JavaScript kinda works better without them.
It’s amazing then to hear an experienced JavaScript developer then speak of JavaScript being object oriented because it supports basic dot notation, even though the language itself is not object oriented in the classical sense.
Place your comment