Well at least that way you can leave the properties "id" and "ref" out and you can have multiple instances of your class. So Its not that "hard coded"
One other approach would be to instanciate the field before in initComponent
like:
this.myField=new Ext.form.field.Text({....});

I have the impression that some users are afraid of directly instantiating components because they want to apply lazy loading (using object literals with an xtype).
However, there is no real benefit in applying xtype lazy loading throughout your component hierarchy if you are properly encapsulating your application by use of classes.

In this example (FeedViewer), for instance, the sub components will be created upon instantiation of the FeedViewer class, and *not* upon definition (aka loading of the code) thereof.

At the same time, taking the code from the first post, all child components will be created as soon as an instance of UIAlterarSenha is created - no matter if you use xtype definitions or not. The loading behavior is the same as in the FeedViewer example.

It surely makes sense to use some form of lazy loading in large applications where parts of the UI are not loaded until a later point in time.
In such a case apply lazy loading at distinctive points high up in the component hierarchy. E.g. if you use a TabPanel or CardLayout to switch between app modules, make sure that the topmost element for a module is lazy loaded.