title: Yii2: Registering Asset Bundle vs registering external Js file
body: <p>Hi I wanted to know the advantage of registering Asset Bundle following the process described in the docs like
  <strong>Process one</strong>
  in AppAsset.php</p>
  
  <pre><code>public $js = [
          'js/myjsfile.js'
      ];
  </code></pre>
  
  <p>then in the view file
  adding Namespace like</p>
  
  <pre><code>namespace app\assets;
  </code></pre>
  
  <p>and then adding the use statement like</p>
  
  <pre><code>use app\assets\AppAsset;
  AppAsset::register($this);
  </code></pre>
  
  <p>Instead of doing all this if I use
  <strong>Process Two</strong></p>
  
  <pre><code>$this-&gt;registerJs('js/myjsfile.js', $this::POS_READY);
  </code></pre>
  
  <p>it works fine.
  So why should I use <strong>Process One</strong>. </p>
  
  <ol>
  <li>Any advantage and reason for this will be greatly appreciated. </li>
  <li>If I follow the <strong>process one</strong> Do I need to add all the js files in
      AppAsset.php individually.</li>
  </ol>
  
  <p>Thanks.</p>