title: Difference between registry.byId and dom.byId in dojo? What is the advantage of using registry.byId?
body: <p>What is the difference between <code>registry.byId</code> and <code>dom.byId</code> in dojo? What is the advantage of using <code>registry.byId</code>?</p>
  
  <p>In the code below I'm using <code>dijit/registry</code> and <code>dojo/dom</code> for both my textbox (<code>#myTextBox3</code>) and my textbox node (<code>#textNode3</code>). Only two of them are providing results.</p>
  
  <pre class="lang-js prettyprint-override"><code>require(["dojo/parser", "dojo/dom", "dijit/registry", "dijit/form/TextBox", "dojo/domReady!"],
      function(parser, dom, registry) {
  
      parser.parse();
  
      // Locate the JS object.
      var dibiWidget = registry.byId("myTextBox3");
      var dobiWidget = dom.byId("myTextBox3");
      var dibiDOM = registry.byId("textNode3");
      var dobiDOM = dom.byId("textNode3");
  
  
      dom.byId("textNode3").innerHTML = "registry.byId for widget id returned: " + dibiWidget + "&lt;br&gt;" +
          "dom.byId for widget id returned: " + dobiWidget + "&lt;br&gt;" +
          "registry.byId for dom id returned: " + dibiDOM + "&lt;br&gt;" +
          "dom.byId for dom id returned: " + dobiDOM + "&lt;br&gt;";
  });
  </code></pre>