Ext JS offers us a useful way of creating configurable properties, which gives us an autogenerated process to get and set their values, and also to perform any updates required in other areas; for example, reflecting the updated value in the UI.
When a class is defined, any properties found in the
config object become completely encapsulated from other class members and are given their own getter and setter methods.
For example, if we move our
version property into a
config object, as shown in the following code snippet, the class will be given two new methods named
setVersion. Notice that we must create a
constructor function and call the
initConfig method to have the class system initialize these ...