Dojo has built its own inheritance-based system of object-orientation, on top of the prototype-based object orientation inherent in JavaScript. The system is used mainly for inheritance, to make it easy to write a base class for Buttons, and extend that to specific types of Buttons later on.
It also makes it simpler to convert code written in Java or other classically object-oriented languages. In contrast to many other object-oriented approaches, Dojo allows for multiple inheritance through mixins, which lets you copy the behavior from any number of base classes.
To declare a class using Dojo, you use the dojo.declare
function:
dojo.declare ("MyNewClass", superclass, { });
Note that everything above is just a one-line function call which is broken down to several lines for pretty printing purposes. That's why theres a trailing left parenthesis at the end of the closing bracket.
It is very easy to forget to close the parenthesis, especially when you're writing your first classes...