CClientScript::registerScriptFile method or put it directly to view (HTML) code and register it using
.css files -- minified, obsfucated and gzipped in the best scenario.
When you build up your Yii application, you can break the MVC pattern and keep everything in the same file. The question is -- is it worth doing so, what are the benefits (none?) and where will that lead you? You can use the same argumentation, when asking, whether to keep JS code inline or not?