title: What is the point of refs in Extjs?
body: <p>I am still trying to understand what the point of <a href="http://training.figleaf.com/tutorials/senchacomplete/chapter2/lesson5/3.cfm" rel="nofollow noreferrer">refs</a> are in Extjs. There seems to be an enormous lack of documentation on the subject.</p>
  
  <p>Refs are supposed to make life easier but I have found that the opposite is true, and I am wondering if it is because I am not using them to their full potential.</p>
  
  <p>If I were to use a ref for a combo in my controller I might have some code like this :</p>
  
  <pre><code>refs: [{
      ref: 'maritalStatusCombo',
      selector: 'combo[name="maritalstatus"]',
  }]
  
  myFunction: function () {
      var comp = this.getMaritalStatusCombo();
  }
  </code></pre>
  
  <p>However I could just as easily write code like this :</p>
  
  <pre><code>var maritalStatusComboSelector = 'combo[name="maritalstatus"]'
  
  myFunction: function () {
      var comp = Ext.ComponentQuery.query(maritalStatusComboSelector)
  }
  </code></pre>
  
  <p>This second version uses less text (..i think), and is more clear to understand IMO.</p>
  
  <p>Also my IDE understands the second much better. </p>
  
  <p>If I select <em>'navigate to..'</em> on the selector string it takes me straight to the declaration up the top. In the first example <em>'navigate to..'</em> on the <strong>getMaritalStatusCombo()</strong> function doesn't take me anywhere.</p>
  
  <p>How are refs supposed to make life easier?</p>