O'Reilly logo

Dojo Fundamentals: Creating Object-Oriented Widgets by Matthew A. Russell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lingo

It will be helpful for us to take just a moment and clarify some of the terms that’ll we’ll use in our discussions. A precise explanation of the JavaScript language’s mechanics packs a lot of lingo[1] that requires precise terminology to properly describe concepts, and the lines only get blurrier when you start building a powerful toolkit on top of it. Hopefully, you’ll find the following list of terms helpful as we progress through some of these murky waters:

Class

A class refers to a logical entity that consists of data (properties) and operations that manipulate that data (methods). In Dojo, function objects that are defined to represent a logical entity are often referred to as classes.Instances of those classes that are created via constructor functions are said to be object instances, or objects. Note that this term is being used loosely, because JavaScript does not support classes in the same sense that they exist in languages like Java and C++.

Dijit

A Dojo widget.

First-Class Object

In computer programming, a first-class object is an entity that can be passed around without restrictions, compared to other objects in the same language. For example, in many programming languages, you cannot pass around functions in the same way that you can pass around other data types such as number or string values. In this particular context, functions would not be considered first-class objects.

In our discussions, the most common way this term will be used is to highlight the fact that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required