components is all my stuff which i would only use in this project (cause it’s very special)
and extensions are the helpers from other people or my own things, which are very generic and could be published as extension on the page
if you want to enable them globally edit the config/main.php and set the component (components.* is imported by default) or extension inside the import…
if you did so, just use the classname inside your code and yii will autoload that file (which must have the same name as the classname)
you also can import them with Yii::import() or set the includes inside a module’s entryfile
for me the modules are like librairies (using their components folder)
or I think you can create a directory in your application (for example generalcode) and add it in main (generalcode.*) so it’ll be available everywhere