Objects with prototype-based mechanisms

Linda M. Wilkens · Journal of computing sciences in colleges · 2002

In this paper we consider using the popular scripting language JavaScript / ECMAScript to teach object-based and object-oriented programming to beginning or novice programmers. We explore JavaScript's use of constructors and prototypes as an alternative to class-definition based systems. We show that JavaScript's prototype-based mechanisms provide the four essential components of the object-oriented paradigm: abstraction, encapsulation, modularity, and hierarchy.We provide examples which conform to the ECMAScript standard, and which have been implemented and tested using the JavaScript interpreter incorporated into Netscape Communicator 4.7.

Read the paper · More papers on PaperTik