Understanding Asset Bundles

Ok, have a basic question.

I get the basic concept of bundles, I think…

Lets say I have one specific page, or one specific form or view which requires some custom javascript. I don’t need this code to be loaded on every page application-wide, so I am not necessarily going to link it globally in my AppAsset file.

Should I register the JS in that view only using $this->registerJsFile()? Or should I be doing something with bundles in this case?

Bundles are better. In the case you need a separate bundle that’s registered in that view specifically.