When to use components and when to use extensions?

Hello,

I’m a little bit confused about the purpose of components and extensions folders in protected/

Please clarify.

Components are project-specific classes, e.g. if I want to change CLinkPager behavior for a particular project, I extend it and put the code into components directory. And if I want to create my own LinkPager (with more features than Yii’s standard pager) which I will use in many projects, I create an extension and can even consider to share it with community :) Technically both are just single classes, but usually an extension has many classes.