Really? You will experience eternal bliss, unicorns and rainbows once you start using XML views
But it is as simple as Mayank Jain points out below; the custom control remains in Javascript, just add it in a separate class file. Referencing the control is then indeed done just as you would a standard control