Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

OO in Dojo

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.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint