Component or Extension?

Hi,

I have some confusion here. Im using yii-mail extension. But i have put all the script in protected/component directory. I have configures main.php and run well tested.

I wonder if it suppose to be in protected/extension directory? When should i use extension and when i should use component?

Thank you.

As far as I know, there’s no strict rule on that.

I think you can do it as you like.

Personally I use this rule:

  • component … application specific libraries.

  • extension … common libraries that I use in 2 or more apps.

And the entries in the extension directory are the symbolic links to those in my common library directory.

This rule made my source code version controlling much easier. :)

Owh thanks for the tips softark! :)