Book Image

Learning Ext JS_Fourth Edition

Book Image

Learning Ext JS_Fourth Edition

Overview of this book

Table of Contents (22 chapters)
Learning Ext JS Fourth Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

The class system


In version 4, the class system was completely redesigned and new features were added. It became a more powerful way to extend and create classes. And Ext JS 5 keeps the same structure and consistency as version 4.

In order to create classes, Ext JS uses the Ext.ClassManager object internally to manage the associations between the names, aliases, or alternate names we define. And all classes (existing and new) use Ext.Base as the base code.

It's not recommended to use these classes directly; instead we should use the following shorthands:

  • Ext.define: This shorthand is used to create a new class, extend a class, or whenever we need to apply some override(s) in a class.

  • Ext.create: This shorthand creates a new instance of a class, using either the fullname class, the alias class, or the alternate name class. Using any of these options, the class manager handles the correct mapping to create the class. We can also use this shorthand to create objects from an existing class.

  • Ext...